@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Oswald', sans-serif;
    background: #0f0f0f;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

body.game-page {
    padding: 0;
    display: block;
}

.container {
    max-width: 700px;
    width: 100%;
    background: #1c1c1c;
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    transform: scale(0.8);
}

h1 {
    text-align: center;
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
}

.categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.category {
    padding: 1.2rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    height: 70px;
    border: 2px solid transparent;
}

.category.blue {
    background: #00d4ff;
}

.category.red {
    background: #c900ff;
}

.category.red h2 {
    color: #fff;
}

.category.pink {
    background: #ff00ea;
}

.category.pink h2 {
    color: #fff;
}

.category.purple {
    background: #cfff00;
}

.category:hover {
    transform: scale(1.05);
}

.category.blue:hover {
    box-shadow: 0 0 30px #00d4ff;
}

.category.red:hover {
    box-shadow: 0 0 30px #c900ff;
}

.category.pink:hover {
    box-shadow: 0 0 30px #ff00ea;
}

.category.purple:hover {
    box-shadow: 0 0 30px #cfff00;
}

.category:active {
    transform: scale(0.98);
}

.category.selected {
    border-color: white;
    box-shadow: 0 0 25px currentColor;
}

.emoji {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.category h2 {
    color: #000;
    font-size: 1.4rem;
    font-weight: 600;
}

.category h3 {
    color: #000;
    font-size: 1.4rem;
    font-weight: 600;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.players-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.player-tag {
    background: #2a2a2a;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    animation: slideIn 0.3s;
}

.player-tag .remove-btn {
    background: none;
    border: none;
    color: #ff4d94;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.player-tag .remove-btn:hover {
    color: #ff006e;
    transform: scale(1.2);
}

.players-section {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.players-section input {
    flex: 1;
    padding: 1.2rem;
    border: none;
    border-radius: 10px;
    font-size: 1.3rem;
    font-family: 'Oswald', sans-serif;
    background: #fff;
    color: #000;
}

.players-section input::placeholder {
    color: #000;
}

.players-section input:focus {
    outline: none;
    background: #f0f0f0;
}

.btn-add {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: #ff00ea;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px #ff00ea;
}

.btn-add:active {
    transform: scale(0.95);
}

.buttons {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 1.2rem;
    font-size: 1.3rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Oswald', sans-serif;
}

.btn-secondary {
    background: #2a2a2a;
    color: white;
}

.btn-secondary:hover {
    background: #333;
    transform: translateY(-2px);
}

.btn-primary {
    background: #cfff00;
    color: #000;
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px #cfff00;
}

.btn-primary:active, .btn-secondary:active {
    transform: scale(0.98);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: #1c1c1c;
    margin: 10% auto;
    padding: 3rem;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: slideIn 0.3s;
    color: white;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close, .close-add {
    color: #888;
    float: right;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover, .close-add:hover {
    color: white;
}

.modal-content h2 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.8rem;
}

.modal-content ul {
    list-style: none;
    color: #ccc;
    line-height: 2.2;
    font-size: 1.3rem;
}

.modal-content ul li::before {
    content: '✓ ';
    color: #cfff00;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Game Page */
.game-container {
    width: 100vw;
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.game-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.custom-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: #2a2a2a;
    border: none;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    color: white;
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.dropdown-toggle:hover {
    background: #333;
}

.dropdown-toggle img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: #2a2a2a;
    border-radius: 12px;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 200px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-item {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    cursor: pointer;
    color: white;
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    text-align: left;
}

.dropdown-item:hover {
    background: #333;
}

.dropdown-item img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.current-player {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.current-player h2 {
    color: white;
    font-size: 4rem;
    font-weight: 600;
    text-transform: capitalize;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.btn-add-player {
    padding: 1.2rem 1.5rem;
    background: #2a2a2a;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Oswald', sans-serif;
    transition: all 0.2s;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-add-player:hover {
    background: #333;
}

#players-list-modal {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.modal-player-item {
    background: #2a2a2a;
    padding: 1rem 1.2rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 1.1rem;
}

.modal-player-item button {
    background: #ff4d94;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.modal-player-item button:hover {
    background: #ff006e;
}

.btn-modal-add {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ff00ea;
    color: white;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-modal-add:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px #ff00ea;
}

.add-player-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    align-items: center;
}

.modal-input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1.3rem;
    font-family: 'Oswald', sans-serif;
    background: #2a2a2a;
    color: white;
}

.modal-input::placeholder {
    color: #888;
}

.modal-input:focus {
    outline: none;
    background: #333;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-home {
    padding: 1.2rem 1.5rem;
    background: #2a2a2a;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Oswald', sans-serif;
    transition: all 0.2s;
    font-size: 1.2rem;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.btn-home:hover {
    background: #333;
}

.game-buttons {
    display: flex;
    height: 100vh;
    width: 100%;
    position: relative;
}

.ou-separator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    color: white;
    z-index: 10;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    pointer-events: none;
}

.game-btn {
    flex: 1;
    border: none;
    border-radius: 0;
    font-size: 6rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    position: relative;
    text-transform: capitalize;
    text-shadow: 3px 3px 15px rgba(0,0,0,0.8);
}

.verite-btn {
    background: #667eea;
    color: #fff;
}

.action-btn {
    background: #ff00ea;
    color: #fff;
}

.game-btn:hover {
    opacity: 0.9;
}

.game-btn:active {
    transform: scale(0.98);
}

.btn-icon {
    display: none;
}

.result-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.3s;
}

.result-container.result-verite {
    background: #667eea;
}

.result-container.result-action {
    background: #ff00ea;
}

.result-container.hidden {
    display: none;
}

.result-card {
    background: transparent;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 800px;
    margin: 2rem;
}

.result-player-name {
    font-size: 2rem;
    color: white;
    margin-bottom: 2rem;
    font-weight: 600;
    text-transform: lowercase;
}

.result-card p {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 3rem;
    line-height: 1.6;
    font-weight: 600;
}

.timer-container {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.timer-display {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    font-family: 'Oswald', sans-serif;
}

.btn-timer {
    padding: 1rem 2rem;
    background: white;
    color: #000;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Oswald', sans-serif;
}

.btn-timer:hover {
    transform: scale(1.05);
}

.btn-timer:active {
    transform: scale(0.98);
}

.btn-next {
    padding: 1.2rem 3rem;
    background: white;
    color: #000;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Oswald', sans-serif;
}

.btn-next:hover {
    transform: scale(1.05);
}

.btn-next:active {
    transform: scale(0.98);
}

#new-player-input {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    margin: 1rem 0;
    font-family: 'Oswald', sans-serif;
    background: #2a2a2a;
    color: white;
}

#new-player-input::placeholder {
    color: #888;
}

#new-player-input:focus {
    outline: none;
    background: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .categories {
        gap: 0.6rem;
    }

    .category {
        height: 55px;
        padding: 0.8rem;
    }

    .category h2 {
        font-size: 0.85rem;
    }

    .game-btn {
        font-size: 2.5rem;
    }

    .current-player h2 {
        font-size: 1.5rem;
    }

    .game-header {
        padding: 1rem;
    }

    .result-card p {
        font-size: 1.1rem;
    }
}
