/* Import site's base styles */
@import url('/css/styles.css');

/* ============================================================================
   GAME MENU CUSTOMIZATION (Guess Who)
   ============================================================================ */
:root {
    --game-primary: #8B5CF6;
    --game-primary-dark: #7C3AED;
    --game-secondary: #EC4899;
}

/* ============================================================================
   GAME-SPECIFIC STYLES
   ============================================================================ */

/* ===== VARIABLES (SCOPED TO GUESS WHO PAGE) ===== */
.guesswho-page {
    /* Game-specific accent (used for stats, highlights, etc.) */
    --guesswho-accent: #00FFBF;     /* Guess Who spectrum accent */
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-color: #1e293b;
    --text-muted: #64748b;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    --transition: all 0.3s ease;

    /* Page background & typography */
    font-family: 'Rockwell', 'Rockwell Nova', 'Roboto Slab', serif;
    background: linear-gradient(140deg, #111827 0%, #1f2937 45%, #0b1120 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    background-attachment: fixed;
}

/* Override body background when game menu is active */
.guesswho-page.game-menu-active {
    --menu-bg-image: url('/interactive/shared/backgrounds/guesswho.png');
    color: #f8fafc;
    min-height: 100vh;
    overflow-y: auto;
}

/* Defer menu backdrop/overlay to shared game-menu.css */

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    background: transparent;
    min-height: 100vh;
}

.guesswho-page.game-menu-active .container {
    max-width: none;
    width: 100%;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.with-game-header .container {
    padding-top: calc(80px + 2rem);
}

/* Remove extra padding at top of game board */
body.with-game-header #game-screen {
    padding-top: 0;
    margin-top: 0;
}

/* Hide container background when menu is active */
.guesswho-page.game-menu-active .container {
    background: transparent;
}

@media (max-width: 768px) {
    body.with-game-header .container {
        padding-top: calc(70px + 2rem);
    }
}

@media (max-width: 480px) {
    body.with-game-header .container {
        padding-top: calc(65px + 2rem);
    }
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.mobile-only {
    display: none;
}

.screen {
    display: none;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.screen.active {
    display: block;
}

/* Ensure game screen appears above menu content */
#game-screen.active {
    z-index: 100;
    position: relative;
}

/* Override for game-menu-screen to use flex display */
.game-menu-screen.active {
    display: flex !important;
}

.guesswho-page.game-menu-active .game-menu-screen.active {
    flex: 1;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 3rem 0 3.5rem;
    position: relative;
}

/* ===== SHARED MENU CUSTOMISATION ===== */
.guesswho-menu .game-menu-container {
    max-width: var(--menu-container-max, 1080px);
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
    color: #f8fafc;
}

/* Remove box backdrop - use shared full-screen overlay */

/* No inner stacking needed when container isn't boxed */

.guesswho-title {
    display: none; /* Use shared hero title instead of custom block */
}

.guesswho-word {
    color: var(--guesswho-accent);
}

.guesswho-menu .game-menu-hero {
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: center;
}

/* Use shared hero title; ensure it's visible and centred */
.guesswho-menu .game-menu-hero__title h1 {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    border: none;
    color: #ffffff !important; /* Override global h1 colour from shared styles */
}

/* Ensure icon sits inline before H1 per standard */
.guesswho-menu .game-menu-hero__title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--menu-spacing-sm);
}

.guesswho-menu .game-menu-hero__subtitle {
    margin: 0 auto;
    max-width: 640px;
    font-size: 1.1rem;
    color: rgba(248, 250, 252, 0.85);
}

.guesswho-menu .game-menu-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.guesswho-menu .game-menu-hero__meta div {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 14px;
    padding: 0.85rem 1.3rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.guesswho-menu .game-menu-hero__meta dt {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.85);
}

.guesswho-menu .game-menu-hero__meta dd {
    margin: 0;
    font-weight: 600;
    color: #fff;
}

.guesswho-menu .game-menu-stats .stat-card {
    background: rgba(15, 23, 42, 0.78);
    border-radius: 18px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.5);
}

.guesswho-menu .game-menu-stats .stat-value {
    color: var(--guesswho-accent);
}

.guesswho-menu .game-menu-stats .stat-label {
    color: #ffffff;
}

.guesswho-menu .game-menu-preview {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--guesswho-accent) 28%, transparent) 0%,
        color-mix(in srgb, var(--guesswho-accent) 10%, transparent) 100%
    );
    border: 1px solid color-mix(in srgb, var(--guesswho-accent) 45%, transparent);
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.55);
}

.guesswho-menu .game-menu-preview__badge {
    background: rgba(37, 99, 235, 0.85);
    color: #fff;
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.35);
}

.guesswho-menu .game-menu-preview__date {
    font-size: 1.05rem;
    font-weight: 600;
    color: #f8fafc;
}

.guesswho-menu .game-menu-preview__countdown,
.guesswho-menu .game-menu-preview__extras li {
    color: rgba(226, 232, 240, 0.82);
}

.guesswho-menu .game-menu-preview__extras li strong {
    color: var(--guesswho-accent);
}


/* Badge display box: use Guess Who accent for border */
.guesswho-menu .badge-display-section {
    border-color: color-mix(in srgb, var(--guesswho-accent) 45%, transparent);
}

.guesswho-menu .game-menu-preview__status {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.35);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guesswho-menu .game-menu-actions {
    gap: 18px;
}

/* ===== MAIN MENU - Now using shared game-menu.css and button system ===== */

/* Difficulty Selection */
.difficulty-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.difficulty-btn {
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.difficulty-btn:hover {
    border-color: var(--primary-color);
    transform: translateX(0.5rem);
    box-shadow: var(--shadow-md);
}

.difficulty-name {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.difficulty-desc {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== INSTRUCTIONS ===== */
.instructions-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.instructions-container h1 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.instructions-container h2 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.instruction-section {
    margin-bottom: 2rem;
}

.instruction-section h2 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.instruction-section ol,
.instruction-section ul {
    margin-left: 2rem;
}

.instruction-section li {
    margin-bottom: 0.5rem;
}

/* ===== GAME SCREEN ===== */
#game-screen {
    display: grid;
    grid-template-areas:
        "toggle toggle"
        "board question";
    grid-template-columns: 1fr 400px;
    gap: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    padding-top: 0;
}

.game-header {
    grid-area: header;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.game-info {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.turn-indicator {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
}

.btn-quit {
    padding: 0.5rem 1rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

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

/* ===== BOARD VIEW TOGGLE ===== */
.board-view-toggle {
    grid-area: toggle;
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.view-toggle-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.view-toggle-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.view-toggle-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== BOARD SECTIONS ===== */
.board-section {
    grid-area: board;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
}

.hidden-view {
    display: none;
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.board-header h2 {
    font-size: 1.25rem;
    color: var(--text-color);
}

.character-counter {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ===== CHARACTER GRID ===== */
.character-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.character-card {
    aspect-ratio: 3/4;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: var(--bg-color);
}

.character-card:hover:not(.eliminated) {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.character-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-card .character-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem;
    font-size: 0.75rem;
    text-align: center;
    font-weight: 600;
}

/* Eliminated State */
.character-card.eliminated {
    opacity: 0.3;
    filter: grayscale(100%);
    cursor: not-allowed;
    transform: rotateX(180deg);
}

.character-card.eliminated:hover {
    transform: rotateX(180deg);
}

/* ===== MYSTERY CHARACTER ===== */
.mystery-section {
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.mystery-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-color);
}

.mystery-character-display {
    display: flex;
    justify-content: center;
}

.mystery-character-card {
    width: 120px;
    aspect-ratio: 3/4;
    border: 3px solid var(--warning-color);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.mystery-character-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mystery-character-card .character-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--warning-color);
    color: white;
    padding: 0.5rem;
    text-align: center;
    font-weight: 600;
}

/* ===== QUESTION PANEL ===== */
.question-panel {
    grid-area: question;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.turn-message {
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 600;
}

.turn-message.opponent {
    background: var(--secondary-color);
}

.turn-message.success {
    background: var(--success-color);
}

.btn-auto-eliminate {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color, #8B5CF6);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.3);
}

.btn-auto-eliminate:hover {
    background: var(--primary-color-dark, #7C3AED);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(139, 92, 246, 0.4);
}

.btn-auto-eliminate:active {
    transform: translateY(0);
}

.btn-auto-eliminate i {
    font-size: 1.2rem;
}

.question-builder {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.question-builder h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* ===== MYSTERY CHARACTER SECTION ===== */
.mystery-section {
    background: var(--card-bg);
    border-radius: 0.5rem;
    border: 2px solid var(--border-color);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.mystery-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
}

.mystery-section-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.mystery-toggle-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    transition: var(--transition);
}

.mystery-toggle-btn:hover {
    color: var(--primary-color, #8B5CF6);
}

.mystery-character-display {
    padding: 1rem;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.mystery-section.collapsed .mystery-character-display {
    max-height: 0;
    padding: 0 1rem;
    overflow: hidden;
}

/* ===== FEATURE SELECTION (SINGLE DROPDOWN) ===== */
.feature-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    margin-bottom: 0.5rem;
}

.feature-select:hover {
    border-color: var(--primary-color, #8B5CF6);
    box-shadow: var(--shadow-sm);
}

.feature-select:focus {
    outline: none;
    border-color: var(--primary-color, #8B5CF6);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.feature-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-color);
}

.value-selection {
    margin-top: 0.5rem;
    animation: slideDown 0.2s ease-out;
}

.value-selection.hidden {
    display: none;
}

.value-selection h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.value-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.value-select:hover {
    border-color: var(--primary-color, #8B5CF6);
    box-shadow: var(--shadow-sm);
}

.value-select:focus {
    outline: none;
    border-color: var(--primary-color, #8B5CF6);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.value-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-color);
}

.value-select option {
    padding: 0.5rem;
}

/* Legacy feature list styles (kept for compatibility) */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-item {
    position: relative;
    display: flex;
    flex-direction: column;
}

.feature-button {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.feature-button:hover {
    border-color: var(--primary-color, #8B5CF6);
    background: var(--bg-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.feature-button.active {
    border-color: var(--primary-color, #8B5CF6);
    background: var(--primary-color, #8B5CF6);
    color: white;
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.3);
}

.feature-button::after {
    content: '▼';
    font-size: 0.75rem;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.feature-button.active::after {
    transform: rotate(180deg);
}

.feature-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-color);
    border-color: var(--border-color);
}

.feature-button:disabled:hover {
    transform: none;
    box-shadow: none;
}

.feature-dropdown {
    position: relative;
    margin-top: 0.5rem;
    animation: slideDown 0.2s ease-out;
}

.feature-dropdown.hidden {
    display: none;
}

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

.feature-value-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.feature-value-select:hover {
    border-color: var(--primary-color, #8B5CF6);
    box-shadow: var(--shadow-sm);
}

.feature-value-select:focus {
    outline: none;
    border-color: var(--primary-color, #8B5CF6);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.feature-value-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-color);
}

.feature-value-select option {
    padding: 0.5rem;
}

/* Legacy checkbox styles (kept for compatibility) */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 0.25rem;
}

.checkbox-item:hover {
    background: white;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-item label {
    cursor: pointer;
    flex: 1;
    font-size: 0.9rem;
}

/* Primary/secondary button visuals now provided by shared .game-btn styles */

.question-preview {
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    font-style: italic;
    color: var(--text-muted);
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.guess-panel {
    text-align: center;
    margin-top: 1rem;
}

.guess-panel .game-btn {
    width: 100%;
    min-width: 200px;
}

/* ===== QUESTION HISTORY ===== */
.question-history {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
}

.question-history h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.history-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.history-tab {
    flex: 1;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: var(--transition);
    margin-bottom: -2px;
}

.history-tab:hover {
    color: var(--text-color);
}

.history-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-list.hidden {
    display: none;
}

.history-list.active {
    display: flex;
}

.history-item {
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.history-question {
    font-weight: 600;
    color: var(--text-color);
}

.history-answer {
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.history-answer.yes {
    color: var(--success-color);
}

.history-answer.no {
    color: var(--danger-color);
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.response-modal {
    max-width: 400px;
}

.final-guess-modal {
    max-width: 450px;
    text-align: center;
}

.final-guess-icon {
    font-size: 4rem;
    color: var(--warning-color);
    margin-bottom: 1rem;
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.final-guess-character {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.final-guess-card {
    width: 150px;
    border: 3px solid var(--warning-color);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.final-guess-card img {
    width: 100%;
    display: block;
}

.final-guess-card-name {
    background: var(--warning-color);
    color: white;
    padding: 0.5rem;
    font-weight: bold;
    font-size: 1.1rem;
}

.final-guess-question {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 1rem 0;
}

/* Guess Grid */
.guess-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
    max-height: 60vh;
    overflow-y: auto;
}

.guess-grid .character-card {
    cursor: pointer;
}

/* Game Stats */
.game-stats {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 600;
    color: var(--text-color);
}

.stat-value {
    color: var(--text-muted);
}

.game-over-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.game-over-buttons button {
    flex: 1;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    #game-screen {
        grid-template-areas:
            "header"
            "toggle"
            "board"
            "question";
        grid-template-columns: 1fr;
    }
    
    .character-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Mobile (<768px) - Swipeable Card Interface */
@media (max-width: 768px) {
    .screen {
        padding: 0;
        overflow: hidden;
    }
    
    .container {
        padding: 0;
    }
    
    /* Old menu styles commented out
    .menu-container {
        padding: 2rem 1rem;
    }
    
    .menu-container h1 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .menu-buttons {
        gap: 0.75rem;
    }
    
    .menu-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    */
    
    .instructions-container {
        padding: 1.5rem;
        overflow-y: auto;
        max-height: 100vh;
    }
    
    /* Mobile Game Screen - Full Height, No Scroll */
    #game-screen {
        display: flex;
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }
    
    .game-header {
        flex-shrink: 0;
        padding: 0.75rem 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .game-info {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        font-size: 0.75rem;
    }
    
    .game-info span {
        font-size: 0.75rem;
    }
    
    .btn-quit {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    /* Hide desktop board toggle on mobile */
    .board-view-toggle {
        display: none;
    }
    
    /* Mobile Card Stack Container */
    .board-section {
        display: none; /* Hide by default */
    }
    
    .board-section.mobile-active {
        display: flex;
        flex: 1;
        flex-direction: column;
        overflow: hidden;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }
    
    .board-header {
        padding: 0.75rem 1rem;
        background: var(--card-bg);
        border-bottom: 2px solid var(--border-color);
        flex-direction: column;
        align-items: flex-start;
    }
    
    .board-header h2 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    /* Mobile view toggle buttons */
    .mobile-view-toggle {
        display: flex;
        gap: 0.5rem;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .view-mode-btn {
        flex: 1;
        padding: 0.5rem;
        background: var(--bg-color);
        border: 2px solid var(--border-color);
        border-radius: 0.5rem;
        cursor: pointer;
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--text-color);
        transition: var(--transition);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .view-mode-btn.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }
    
    .view-mode-btn i {
        font-size: 1rem;
    }
    
    /* Mobile Grid View */
    #opponent-board-section.mobile-active #opponent-board {
        grid-auto-rows: minmax(120px, auto);
    }
    
    /* Mobile Grid Cards */
    .mobile-grid-card {
        aspect-ratio: 3/4;
        border: 2px solid var(--border-color);
        border-radius: 0.5rem;
        overflow: hidden;
        cursor: pointer;
        transition: var(--transition);
        position: relative;
        background: var(--bg-color);
        display: flex;
        flex-direction: column;
        min-height: 0; /* Allow shrinking */
    }
    
    .mobile-grid-card:active {
        transform: scale(0.95);
        border-color: var(--danger-color);
    }
    
    .mobile-grid-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    
    .mobile-grid-name {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 0.4rem 0.25rem;
        font-size: 0.7rem;
        text-align: center;
        font-weight: 600;
        line-height: 1.2;
    }
    
    /* Mobile Card Stack */
    .mobile-card-stack {
        position: relative;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        padding-bottom: 10rem; /* Space for action buttons and nav */
    }
    
    /* Ensure grid is hidden when in swipe mode */
    .board-section.mobile-active .character-grid {
        display: none;
    }
    
    /* Grid view scrolling container */
    .board-section.mobile-active {
        overflow-y: hidden; /* Prevent double scrolling */
    }
    
    .board-section.mobile-active .character-grid {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    
    .mobile-character-card {
        position: absolute;
        width: 85%;
        max-width: 350px;
        height: 60%;
        max-height: 500px;
        background: white;
        border-radius: 1rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        cursor: grab;
        touch-action: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    
    .mobile-character-card:active {
        cursor: grabbing;
    }
    
    .mobile-character-card.swiping {
        transition: none;
    }
    
    .mobile-character-card.swipe-left {
        animation: swipeLeft 0.3s ease-out forwards;
    }
    
    .mobile-character-card.swipe-right {
        animation: swipeRight 0.3s ease-out forwards;
    }
    
    @keyframes swipeLeft {
        to {
            transform: translateX(-150%) rotate(-30deg);
            opacity: 0;
        }
    }
    
    @keyframes swipeRight {
        to {
            transform: translateX(150%) rotate(30deg);
            opacity: 0;
        }
    }
    
    .mobile-character-card img {
        width: 100%;
        height: 70%;
        object-fit: cover;
    }
    
    .mobile-card-info {
        padding: 1rem;
        text-align: center;
        background: white;
        flex-shrink: 0;
    }
    
    .mobile-card-name {
        font-size: 1.5rem;
        font-weight: bold;
        color: var(--text-color);
        margin-bottom: 0.25rem;
    }
    
    .mobile-card-features {
        font-size: 0.85rem;
        color: var(--text-muted);
    }
    
    /* Mobile card progress counter */
    .mobile-card-progress {
        position: absolute;
        top: 1rem;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 2rem;
        font-size: 0.875rem;
        font-weight: 600;
        z-index: 10;
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .btn-review-again-mini {
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 0.4rem 0.75rem;
        border-radius: 1rem;
        font-size: 0.75rem;
        cursor: pointer;
        white-space: nowrap;
    }
    
    .btn-review-again-mini i {
        margin-right: 0.25rem;
    }
    
    /* Swipe indicators */
    .swipe-indicators {
        position: absolute;
        top: 50%;
        width: 100%;
        display: flex;
        justify-content: space-between;
        padding: 0 2rem;
        pointer-events: none;
        z-index: 10;
    }
    
    .swipe-indicator {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
        opacity: 0;
        transition: opacity 0.2s;
    }
    
    .swipe-indicator.active {
        opacity: 1;
    }
    
    .swipe-left-indicator {
        background: rgba(239, 68, 68, 0.9);
        color: white;
    }
    
    .swipe-right-indicator {
        background: rgba(34, 197, 94, 0.9);
        color: white;
    }
    
    /* Mobile action buttons */
    .mobile-card-actions {
        position: absolute;
        bottom: calc(5rem + env(safe-area-inset-bottom));
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 2rem;
        z-index: 10001;
    }
    
    .mobile-action-btn {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        transition: transform 0.2s;
        position: relative;
        z-index: 10001;
    }
    
    .mobile-action-btn:active {
        transform: scale(0.9);
    }
    
    .mobile-action-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }
    
    .mobile-eliminate-btn {
        background: var(--danger-color);
        color: white;
    }
    
    .mobile-keep-btn {
        background: var(--success-color);
        color: white;
    }
    
    .mobile-undo-btn {
        background: var(--secondary-color);
        color: white;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* Mobile Question Panel */
    .question-panel {
        flex-shrink: 0;
        overflow-y: auto;
        padding: 1rem;
        padding-bottom: 5rem; /* Space for bottom nav */
        display: none; /* Hidden by default, shown via mobile nav */
    }
    
    .question-panel.mobile-active {
        display: flex;
        flex: 1;
    }
    
    .mystery-section {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .mystery-section h3 {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    .mystery-character-card {
        width: 80px;
    }
    
    .turn-message {
        padding: 0.75rem;
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }
    
    .question-builder h4 {
        font-size: 0.75rem;
    }
    
    .checkbox-group {
        padding: 0.5rem;
        max-height: 150px;
        overflow-y: auto;
    }
    
    .checkbox-item {
        padding: 0.4rem;
    }
    
    .checkbox-item label {
        font-size: 0.85rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 0.6rem 1rem;
        font-size: 0.875rem;
    }
    
    .question-preview {
        padding: 0.5rem;
        font-size: 0.8rem;
        min-height: 2rem;
    }
    
    .guess-panel {
        margin: 0.5rem 0;
    }
    
    .question-history {
        margin-top: 0.75rem;
    }
    
    .question-history h3 {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    .history-tabs {
        margin-bottom: 0.5rem;
    }
    
    .history-tab {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .history-list {
        max-height: 120px;
        overflow-y: auto;
    }
    
    .history-item {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Mobile Bottom Navigation */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--card-bg);
        border-top: 2px solid var(--border-color);
        display: flex;
        justify-content: space-around;
        padding: 0.75rem 0.5rem;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
        z-index: 100;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-nav-btn {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        background: none;
        border: none;
        color: var(--text-muted);
        cursor: pointer;
        padding: 0.5rem;
        font-size: 0.7rem;
        transition: var(--transition);
    }
    
    .mobile-nav-btn i {
        font-size: 1.5rem;
    }
    
    .mobile-nav-btn.active {
        color: var(--primary-color);
    }
    
    .nav-badge {
        position: absolute;
        top: 0;
        right: 0;
        background: var(--primary-color);
        color: white;
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
        border-radius: 1rem;
        font-weight: bold;
        min-width: 1.25rem;
        text-align: center;
    }
    
    /* Mobile modals - fullscreen */
    .modal {
        padding: 0;
    }
    
    .modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        max-width: 100%;
        border-radius: 0;
        padding: 1.5rem;
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
        overflow-y: auto;
    }
    
    /* Grid view for guess modal on mobile */
    .guess-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }
    
    .guess-grid .character-card {
        aspect-ratio: 3/4;
    }
    
    /* Difficulty buttons on mobile */
    .difficulty-options {
        margin: 1rem 0;
    }
    
    .difficulty-btn {
        padding: 1.25rem;
    }
}

/* Very Small Mobile (<480px) */
@media (max-width: 480px) {
    .character-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .guess-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Old menu container styles commented out
    .menu-container {
        padding: 2rem 0.5rem;
    }
    */
    
    .game-over-buttons {
        flex-direction: column;
    }
}

/* ===== ONLINE MULTIPLAYER ELEMENTS ===== */
.online-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
}

.room-code-display {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
}

.room-code {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 0.5rem;
    color: var(--primary-color);
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
}

.waiting-message {
    color: var(--text-muted);
    font-style: italic;
    margin-top: 1rem;
}

.error-message {
    color: var(--danger-color);
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 0.5rem;
    margin: 1rem 0;
}

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

.modal-buttons button {
    flex: 1;
}

.connection-status {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--card-bg);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 999;
}

.connection-status.hidden {
    display: none;
}

.connection-status i {
    color: var(--success-color);
}

/* ===== ACCESSIBILITY ===== */
/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --text-color: #000;
    }
}

/* ============================================================================
   FRIENDS SYSTEM STYLES
   ============================================================================ */

.friends-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    overflow-y: auto;
}

.friends-container {
    max-width: 800px;
    margin: 2rem auto;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--game-primary);
}

.friends-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
}

.friends-header h1 {
    margin: 0;
    color: var(--text-color);
    font-size: 2rem;
}

.close-friends-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-friends-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-color);
}

.friends-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.add-friend-section h2,
.friends-list-section h2 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.add-friend-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.friend-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Rockwell', 'Rockwell Nova', 'Roboto Slab', serif;
}

.friend-input:focus {
    outline: none;
    border-color: var(--game-primary);
}

.friend-message {
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    display: none;
}

.friend-message.success {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success-color);
    border: 1px solid var(--success-color);
    display: block;
}

.friend-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    display: block;
}

.friends-list-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#friends-count {
    background: var(--game-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 1rem;
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.no-friends-message {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    font-style: italic;
}

.friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-color);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    transition: all 0.3s;
}

.friend-item:hover {
    border-color: var(--game-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.friend-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.friend-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--game-primary) 0%, var(--game-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.friend-details {
    display: flex;
    flex-direction: column;
}

.friend-name {
    font-weight: bold;
    color: var(--text-color);
    font-size: 1.1rem;
}

.friend-status {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.friend-status.online {
    color: var(--success-color);
    font-weight: bold;
}

.friend-status.online::before {
    content: '●';
    color: var(--success-color);
    font-size: 1.2rem;
}

.friend-status.offline::before {
    content: '●';
    color: var(--text-muted);
    font-size: 1.2rem;
}

.status-indicator {
    display: inline-block;
    font-size: 1rem;
    margin-right: 0.25rem;
}

.status-indicator.online-dot {
    color: var(--success-color);
}

.status-indicator.offline-dot {
    color: var(--text-muted);
}

/* Connection Quality Indicator */
.connection-quality {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.05);
}

.connection-quality.excellent {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.connection-quality.good {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.connection-quality.fair {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.connection-quality.poor {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.connection-quality-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.connection-quality.excellent .connection-quality-indicator {
    background: #22c55e;
    box-shadow: 0 0 4px #22c55e;
}

.connection-quality.good .connection-quality-indicator {
    background: #3b82f6;
    box-shadow: 0 0 4px #3b82f6;
}

.connection-quality.fair .connection-quality-indicator {
    background: #fbbf24;
    box-shadow: 0 0 4px #fbbf24;
}

.connection-quality.poor .connection-quality-indicator {
    background: #ef4444;
    box-shadow: 0 0 4px #ef4444;
}

.friend-actions {
    display: flex;
    gap: 0.5rem;
}

.friend-action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s;
    font-family: 'Rockwell', 'Rockwell Nova', 'Roboto Slab', serif;
    min-width: 44px;
    min-height: 44px;
}

.friend-action-btn.challenge {
    background: var(--success-color);
    color: white;
}

.friend-action-btn.challenge:hover {
    background: #16a34a;
    transform: scale(1.05);
}

.friend-action-btn.remove {
    background: var(--danger-color);
    color: white;
}

.friend-action-btn.remove:hover {
    background: #dc2626;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .friends-container {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        padding: 1rem;
    }
    
    .friend-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .friend-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .add-friend-form {
        flex-direction: column;
    }
}
