/* Lobby & Game Creation Styles */
.lobby-container {
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
    flex: 1;
}

.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.lobby-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.lobby-header .logo h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
}

.lobby-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    position: relative;
    z-index: 2000;
}

.vault-key-field {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    color: white;
    font-size: 0.85rem;
    width: 240px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.vault-key-field:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Authentication Profile Styles */
.auth-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--glass-border);
}

.user-info-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.35rem 0.5rem 0.35rem 0.35rem;
    border-radius: 2rem;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s;
}

.user-info-area:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.user-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.user-display-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f8fafc;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-btn {
    padding: 0.6rem 1.25rem;
    background: white;
    color: #0f172a;
    font-weight: 700;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
}

.auth-btn:hover {
    background: var(--text-main);
    transform: translateY(-1px);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.game-card {
    height: 420px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.game-card.locked {
    outline: 2px solid var(--danger);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.game-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-card-img {
    opacity: 0.85;
}

.game-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.98), transparent);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.game-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin: 0;
    color: #fff;
}

.game-card .creator {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
}

.game-card .description {
    font-size: 0.85rem;
    color: #94a3b8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.game-card .join-btn {
    margin-top: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    border: none;
    border-radius: 0.75rem;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.game-card .join-btn:hover {
    transform: scale(1.02);
}

.player-count-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(99, 102, 241, 0.25);
    color: var(--primary);
    padding: 0.4rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.player-count-tag.vibrant-active {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    /* Brighter, soft green */
    border: 1px solid rgba(74, 222, 128, 0.3);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.15);
}

.admin-delete-btn {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239, 68, 68, 0.9);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 20;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-delete-btn:hover {
    background: #ef4444;
    transform: translateX(-50%) scale(1.15);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Lobby Settings Panel */
.settings-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    max-width: 500px;
    animation: slideIn 0.3s ease-out;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.status-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.settings-body label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.settings-body input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    font-family: monospace;
    font-size: 0.85rem;
}

.settings-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Description Entry & Controls */
.description-entry {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: rgba(15, 23, 42, 0.4);
    padding: 0.75rem;
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
    margin-top: 0.25rem;
}

.description-entry textarea {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    min-height: 80px;
    resize: none;
    font-size: 0.9rem;
    line-height: 1.5;
}

.description-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mic-voice-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mic-voice-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

.mic-voice-btn.recording {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
    animation: pulse-red 2s infinite;
}

.generate-art-btn {
    margin-left: auto;
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.generate-art-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

.generate-art-btn:active {
    transform: translateY(0);
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* System Dropdown & Tags */
.modal-select {
    width: 100%;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.modal-select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.6);
}

.system-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 5;
}