
.nav {
  width: 100%;
  display: flex; /* Use flexbox for easy alignment */
  justify-content: space-between; /* Distribute space between logo and links */
  align-items: center; /* Vertically align items in the nav */
  padding: 20px; 
    grid-area: nav;
    background: rgba(255, 0, 208, var(--tw-bg-opacity));
    margin-top: 3px;
}
main {
  width: 80%; /* Adjust this value to control the width of the main content */
  max-width: 960px; /* Optional: Set a maximum width for larger screens */
  margin: 0 auto; /* Center the main content horizontally */
  /* Add any other styling for your main content area */
}

  
  #logo-container {
    margin-bottom: 20px;
  }
  
  #logo {
    filter: blur(10px);
    max-width: 800px;
    height: 200px;
    width: 200px;
  }
  

      #guesses-left {
        margin-top: 10px;
        font-size: 18px;
      }
    

      








      .performance-title {
        color: black;
    }





 .popup {
    display: none;
    position: fixed;
    max-height: 84vh;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    z-index: 1000;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 600px;
    overflow-y: auto;
}

/* Header with baseball pattern */
.popup h2 {
    margin: 0;
    padding: 24px;
    background: #2563eb;
    color: white;
    font-size: 24px;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.popup h2::before, .popup h2::after {
    content: '';
    position: absolute;
    width: 32px;
    height: 32px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.popup h2::before {
    top: 8px;
    left: 8px;
}

.popup h2::after {
    top: 8px;
    right: 8px;
}

/* Stats section */
.stats {
    padding: 24px;
}

.stats-content {
    display: grid;
    gap: 16px;
}

.stats-line {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Individual stat items */
.stats-item {
    background: #eff6ff;    border-radius: 12px;
    padding: 16px;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.stats-item:hover {
    transform: translateY(-2px);
}



/* Streak stats */
.stats-item.current-streak {
    background: #eff6ff;
}

/* Stats figures and labels */
.stat-item-figure {
    font-size: 32px;
    font-weight: bold;
    color: #2563eb;
    margin: 0;
    line-height: 1;
}

.stat-item-label {
    font-size: 14px;
    color: #64748b;
    margin: 4px 0 0 0;
}

#solutionGrid {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0 16px;
    transform: scale(0.7);
    transform-origin: center center;
    margin-top: -50px;
    display: grid;
    grid-template-columns: auto repeat(3, 1fr); /* Changed from 150px to auto for first column */
    gap: 12px;
    width: fit-content; /* Added to prevent unwanted stretching */

}

/* Update the soluce container to properly center its contents */
.soluce {
    padding: 24px;
    background: #f8fafc;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    /* Ensure contents are centered */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.subtitle {
    /* Keep the subtitle styling but ensure it's centered */
    text-align: center;
    width: 100%;
}

.categories-grid-title {
    color: #000000;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .soluce {
        background: #1e293b;
        border-color: #334155;
    }
}


.subtitle::before {
    content: "🏆";
    font-size: 24px;
}

/* Footer and countdown */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.next-in {
    color: #64748b;
    font-size: 16px;
    font-weight: bold;

    display: flex;
    align-items: center;
    gap: 8px;
}



#countdownAnchorage {
    font-size: 24px;
    font-weight: bold;
    color: #ef4444;
}

/* CTA Button */
.cta-button {
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.cta-button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.cta-button::before {
    content: "🏆";
    font-size: 20px;
}

.cta-button2 {
    width: 50%;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.cta-button2:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}




/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .popup {
        background: #1e293b;
    }

    .stats{
        background: #1e293b;
  
}
    
    .stats-item {
        background: #334155;
    }
    
    .stats-item.current-streak {
        background: #334155;
    }
    
    .stat-item-figure {
        color: #60a5fa;
    }
    
    .stat-item-label {
        color: #94a3b8;
    }
    
    .soluce {
        background: #1e293b;
        border-color: #334155;
    }
    
    .subtitle {
        color: white;
    }
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .popup {
        width: 95%;
    }
    
    .stat-item-figure {
        font-size: 24px;
    }
    
    .stat-item-label {
        font-size: 12px;
    }
    
    .subtitle {
        font-size: 18px;
    }
}


  






  
  .navbar-content {
    display: flex;
    align-items: center;
    flex: 1; /* Use flex property to make it take remaining space */
  }
  
  .navbar-content img[alt="BBlogo"] {
    width: 150px; /* Adjust the width as needed */
    height: 50px; /* Maintain aspect ratio */
    margin-top: 10px; /* Remove default margin */
    margin-left: 10px;
}

  
  .logos {
    display: flex;
    margin-left: auto;
    justify-self: end;
    margin-top: 10px;
  }
  
  
  .logos a,
  .logos #statsLogo {
    margin-left: 20px; /* Add margin between logos */
    justify-self: end;
    display: inline-block;
    margin-right: 10px;
    position: relative;
    transition: transform 0.3s ease-in-out; /* Add a smooth transition effect */
  }

  .logos a:hover,
.logos #statsLogo:hover {
    transform: scale(1.2); /* Adjust the scaling factor as needed */
  }


  
  #sidebar {
    background: rgba(255, 0, 208, var(--tw-bg-opacity));
    grid-area: sidebar;
    border-radius: var(--main-radius);
    padding-top: var(--main-padding);
  }
  
  #sidebar2 {
    background: rgba(255, 0, 208, var(--tw-bg-opacity));
    grid-area: sidebar2; /* Corrected the grid-area to sidebar2 */
    border-radius: var(--main-radius);
    padding-top: var(--main-padding);
  }
  
  footer {
    background: rgba(255, 0, 208, var(--tw-bg-opacity));
    grid-area: footer;
    border-radius: var(--main-radius);
    padding: 20px 0; /* Adjusted padding */
    text-align: center;
    align-items: center;
    margin-bottom: 0; /* Ensure no margin at bottom */
    width: 100%; /* Ensure full width */
}
  
  footer p {
    margin: 0; /* Remove default margin to prevent extra spacing */
  }
  
  footer a {
    display: inline-block; /* Display links in a line */
    margin: 0 10px; /* Add some spacing between links, adjust as needed */
    text-decoration: none;
    color: #000000; /* Set the link color */
    font-weight: bold;
  }
  
  footer a:hover {
    text-decoration: underline; /* Add underline on hover */
  }
  
  
  @media only screen and (max-width: 860px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr auto;
        grid-template-areas:
            "nav"
            "sidebar"
            "main"
            "sidebar2"
            "footer";
        min-height: 100vh;
        height: 100%; /* Added this */
    }

    footer {
        margin-top: 0;
        padding: 15px 0;
        position: relative; /* Added this */
        bottom: 0; /* Added this */
        width: 100%;
    }
    
    /* Add this to ensure main content pushes footer down */
    main {
        min-height: calc(100vh - 200px); /* Adjust value based on your header/footer heights */
    }
}



.main {
    background: rgba(255, 0, 208, var(--tw-bg-opacity));
    grid-area: main;
    border-radius: var(--main-radius);
    padding-top: var(--main-padding);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%; /* Set the width to be 100% of the parent (main) */
}










  #soluceTable table {
  border-collapse: collapse;
  width: 100%;
}

#soluceTable table tr {
  border: 1px solid #000000;
}

#soluceTable table td {
  padding: 8px;
  border: 1px solid #000000;
  text-align: center;
}





.next-in {
    margin-bottom: 10px; /* Margin bottom for next-in */
}

#countdownAnchorage {
  color: red; /* Red color for countdown */
  font-size: 24px; /* Bigger font size for countdown */
}


    

.game-layout {
    display: flex;
    align-items: start;
    justify-content: center;
    gap: 20px; /* Reduced from 40px to help with smaller screens */
    max-width: 850px;
    margin: 0 auto;
    padding: 0 1rem;
}

.grid-container {
    margin-top: 50px;
    display: grid;
    grid-template-columns: auto repeat(3, 1fr); /* Changed from 150px to auto for first column */
    gap: 12px;
    width: fit-content; /* Added to prevent unwanted stretching */

}

.game-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 20px;
}

.give-up-button {
    background-color: #ef4444;  /* Red-500 */
    color: white;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.give-up-button:hover {
    background-color: #dc2626;  /* Red-600 */
}

/* Base styles with relative units */
.header-cell {
    height: clamp(80px, 15vw, 150px);
    width: clamp(80px, 15vw, 150px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: clamp(12px, 1.4vw, 14px);
    font-weight: 600;
    padding: clamp(8px, 1.2vw, 12px);
    word-wrap: break-word;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: clamp(8px, 1.2vw, 12px);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-cell.revealed {
    background: #f8fafc;
    border-color: var(--primary-light);
}

.team-logo {
    width: 130px;
    height: 130px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.player-cell {
    position: relative;
    height: clamp(80px, 15vw, 150px);
    width: clamp(80px, 15vw, 150px);
    border-radius: clamp(8px, 1.2vw, 12px);
    overflow: hidden;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.player-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.player-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    color: white;
    font-size: clamp(12px, 1.6vw, 16px);
    text-align: center;
    backdrop-filter: blur(4px);
}

.guesses-counter {
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .game-layout {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .game-controls {
        margin-top: 20px;
        width: 100%;
        max-width: 900px;
        flex-direction: row;
        justify-content: center;
    }
}



@media screen and (max-width: 480px) {
    .game-layout {
        padding: 0.25rem;
    }

    .grid-container {
        gap: 6px;
        margin-top: 20px;
    }

    .header-cell, .player-cell {
        height: 90px;
        width: 73px;
    }
    
    .header-cell {
        padding: 6px;
        font-size: 11px;
    }
    
    .team-logo {
        width: auto;
        height: auto;
    }
    
    .player-name {
        font-size: 9px;
    }
    
    .guesses-counter {
        font-size: 14px;
    }

}


   
        .game-over {
            font-size: 32px;
            font-weight: 700;
            color: var(--error);
            text-align: center;
            margin: 32px 0;
            text-shadow: 0 1px 2px rgba(0,0,0,0.1);
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }

        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 999;
            backdrop-filter: blur(1px);
        }

        .modal-overlay.active {
            display: block;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background: white;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            z-index: 1000;
            transform: translateY(-100%);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .modal.active {
            display: block;
            transform: translateY(0);
        }

        .modal-content {
            max-width: 900px;
            margin: 0 auto;
            padding: 24px;
            position: relative;
        }

        .search-container {
            position: relative;
        }

        .search-input {
            width: 100%;
            padding: 16px;
            padding-left: 48px;
            border: 2px solid #e2e8f0;
            border-radius: 12px;
            font-size: 16px;
            outline: none;
            transition: all 0.2s ease;
        }

        .search-input:focus {
            border-color: var(--primary-light);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .search-icon {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: #64748b;
        }

        .search-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 2px solid #e2e8f0;
            border-top: none;
            border-radius: 0 0 12px 12px;
            max-height: 400px;
            overflow-y: auto;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }

        .search-item {
            display: flex;
            align-items: center;
            padding: 12px 16px;
            cursor: pointer;
            border-bottom: 1px solid #e2e8f0;
            transition: all 0.2s ease;
        }

        .search-item:last-child {
            border-bottom: none;
        }

        .search-item:hover {
            background: #f8fafc;
        }

        .search-item img {
            width: 36px;
            height: 36px;
            margin-right: 16px;
            filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
        }

        .close-button {
            position: absolute;
            top: 16px;
            right: 16px;
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            padding: 8px;
            border-radius: 50%;
            color: #64748b;
            transition: all 0.2s ease;
        }

        .close-button:hover {
            background: #f1f5f9;
            color: #0f172a;
        }

        /* Dark mode styles */
        @media (prefers-color-scheme: dark) {
            body {
                background: #0f172a;
                color: #f8fafc;
            }

            .header-cell {
                background: #1e293b;
                border-color: #334155;
            }

            .header-cell:hover {
                background: #334155;
            }

            .player-cell {
                background: #1e293b;
            }

            .modal {
                background: #1e293b;
            }

            .search-input {
                background: #334155;
                border-color: #475569;
                color: #f8fafc;
            }

            .search-results {
                background: #1e293b;
                border-color: #475569;
            }

            .search-item {
                border-color: #334155;
                color: #f8fafc;
            }

            .search-item:hover {
                background: #334155;
            }

            .close-button {
                color: #94a3b8;
            }

            .close-button:hover {
                background: #334155;
                color: #f8fafc;
            }
        }

        .error-shake {
        animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    }
    
    @keyframes shake {
        10%, 90% { transform: translate3d(-1px, 0, 0); }
        20%, 80% { transform: translate3d(2px, 0, 0); }
        30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
        40%, 60% { transform: translate3d(4px, 0, 0); }
    }


    .search-container.loading::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.8);
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .search-container.loading::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 30px;
        height: 30px;
        border: 3px solid #e5e7eb;
        border-top: 3px solid #3b82f6;
        border-radius: 50%;
        z-index: 1;
        animation: spin 1s linear infinite;
    }
    
    .error-state {
        background-color: #fee2e2 !important;
        animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    }
    
    @keyframes spin {
        0% { transform: translate(-50%, -50%) rotate(0deg); }
        100% { transform: translate(-50%, -50%) rotate(360deg); }
    }

    .search-item {
        padding: 12px 16px;
        cursor: pointer;
        border-bottom: 1px solid #e2e8f0;
        transition: all 0.2s ease;
    }

    .search-item:last-child {
        border-bottom: none;
    }

    .search-item:hover {
        background: #f8fafc;
    }

    .search-item img {
        width: 36px;
        height: 36px;
        margin-right: 16px;
        filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
    }

    /* Dark mode styles */
    @media (prefers-color-scheme: dark) {
        .search-item:hover {
            background: #1e293b;
        }
        
        svg.text-gray-400 {
            color: #94a3b8;
        }
        
        svg.text-gray-400:hover {
            color: #e2e8f0;
        }
    }




/* Empty top-left corner */
.empty-corner {
    background-color: transparent;
    width: 100%;
    height: 100%;
}

/* Header cells (top and left) */
.header-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    background-color: #f1f5f9;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
}

/* Large headers */
.large-header {
    height: 150px;
    width: 150px;
}

/* Player cells */
.player-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
}

.large-cell {
    height: 150px;
    width: 150px;
}

/* Player images */
.player-cell img {
    width: 100%;
    height: 100%;
}

/* Player names */

.player-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 15px;
}



@media (max-width: 480px) {
    .grid-container {
        transform: scale(0.90);
       
    }
}

@media (max-width: 380px) {
    .grid-container {
        transform: scale(0.78);
       
    }
}

@media (max-width: 320px) {
    .grid-container {
        transform: scale(0.75);
      
    }
}




@media screen and (max-width: 768px) {
   
   
    .game-layout {
        padding: 0.5rem;
    }

    .player-name {
        font-size: 13px;
    }
    

    .grid-container {
        gap: 8px;
        
    }

    .header-cell, .player-cell {
        height: 100px;
        width: 100px;
    }

    .header-cell {
        font-size: 14px;
    }
    
    .team-logo {
        width: 90px;
    height: 90px;
    }
}



/* Responsive breakpoints */
@media (max-width: 640px) {
    .grid-container {
        gap: 2px;
    }

    .header-cell {
        font-size: 14px;
        padding: 2px;
        min-height: 32px;
    }

    .player-name {
        font-size: 13px;
        padding: 2px;
    }
}

@media (max-width: 480px) {
    .header-cell {
        font-size: 14px;
        min-height: 28px;
    }

    .modal {
        width: 95%;
    }

    .search-item {
        padding: 8px;
    }

    .player-name {
        font-size: 12px;
    }
  
}

@media (max-width: 380px) {
    .grid-container {
        gap: 1px;
        padding: 2px;
    }

    .header-cell {
        font-size: 14px;
        padding: 2px;
        min-height: 24px;
    }

    .player-name {
        font-size: 11px;
    }
}

@media (max-width: 320px) {
    .header-cell {
        font-size: 12px;
        min-height: 20px;
    }

    .player-name {
        font-size: 9px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .player-cell {
        background: #1f2937;
        border-color: #374151;
    }

    .header-cell {
        background: #ffffff;
        border-color: #374151;
    }
    .text-xl {
       color: black;
    }

    .modal {
        background: #1f2937;
        color: white;
    }

    .search-input {
        background: #374151;
        color: white;
        border-color: #4b5563;
    }

    .search-input::placeholder {
        color: #9ca3af;
    }

    .search-item {
        border-color: #374151;
    }

    .search-item:hover {
        background-color: #374151;
    }
}

 Game controls responsive styles */
.game-controls {
    margin: 16px auto;
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding: 0 8px;
}

.guesses-counter {
    font-size: 18px;
    font-weight: bold;
}

@media (max-width: 640px) {
    .guesses-counter {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .guesses-counter {
        font-size: 14px;
    }
}

/* Stats popup responsive styles */
.popup {
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 480px) {
    .stats-line {
        flex-direction: column;
        gap: 16px;
    }

    .stats-item {
        width: 100%;
    }

    .stat-item-figure {
        font-size: 24px;
    }

    .stat-item-label {
        font-size: 14px;
    }
}


.empty-corner {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.category-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    cursor: pointer;
    padding: 8px;
    transition: background-color 0.2s;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #2196F3;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-label {
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .empty-corner {
        background-color: rgb(31, 41, 55);
    }
    
    .category-toggle:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .toggle-label {
        color: #999;
    }
}


/* Hide the category toggle in easy mode */
body[data-difficulty="easy"] .category-toggle {
    display: none !important;
  }
  
  /* Make sure the empty corner remains empty */
  body[data-difficulty="easy"] .empty-corner {
    background-color: transparent;
    border: none;
    box-shadow: none;
  }
  
  /* Media queries to maintain responsive design */
  @media (prefers-color-scheme: dark) {
    body[data-difficulty="easy"] .empty-corner {
      background-color: transparent;
    }
  }

 /* Styling for difficulty mode indicators */
.easy-mode-indicator, .medium-mode-indicator, .hard-mode-indicator {
    animation: fadeIn 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
  }
  
  .easy-mode-indicator {
    border-left: 4px solid #22c55e; /* Green */
  }
  
  .medium-mode-indicator {
    border-left: 4px solid #3b82f6; /* Blue */
  }
  
  .hard-mode-indicator {
    border-left: 4px solid #ef4444; /* Red */
  }
  
  /* Animated background effect */
  .easy-mode-indicator::after, 
  .medium-mode-indicator::after, 
  .hard-mode-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
    z-index: 1;
    pointer-events: none;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  @keyframes shimmer {
    100% { transform: translateX(100%); }
  }
  
  /* Enhanced team logo display in easy mode */
  body[data-difficulty="easy"] .search-item img {
    width: 42px;
    height: 42px;
    transition: transform 0.2s ease;
  }
  
  body[data-difficulty="easy"] .search-item:hover img {
    transform: scale(1.1);
  }
  
  /* Make sure empty corner stays empty in easy mode */
  body[data-difficulty="easy"] .empty-corner {
    background: transparent;
    border: none;
    box-shadow: none;
  }

  /* Hide the category toggle in all modes */
.category-toggle {
    display: none !important;
  }
  
  /* Make sure the empty corner remains empty */
  .empty-corner {
    background-color: transparent;
    border: none;
    box-shadow: none;
  }
  
  /* Media queries to maintain responsive design */
  @media (prefers-color-scheme: dark) {
    .empty-corner {
      background-color: transparent;
    }
  }

  /* Back button styling for search dropdown */
.search-back-button {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;
    color: #64748b;
}

.search-back-button:hover {
    background-color: #f1f5f9;
}

.search-back-button svg {
    margin-right: 8px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .search-back-button {
        background-color: #334155;
        border-bottom-color: #475569;
        color: #94a3b8;
    }
    
    .search-back-button:hover {
        background-color: #1e293b;
    }
}

/* Animation for back button appearance */
@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.search-back-button {
    animation: slideInLeft 0.2s ease-out;
}


.difficulty-switcher {
    width: 100%;
    display: flex;
    justify-content: center;
  
}

.difficulty-links {
    display: flex;
    gap: 15px;
    background: white;
    padding: 8px 16px;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.difficulty-link {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.difficulty-link:hover {
    transform: translateY(-2px);
}

.difficulty-icon {
    margin-right: 6px;
    font-size: 18px;
}

.easy-link {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.easy-link:hover {
    background: rgba(34, 197, 94, 0.2);
}

.medium-link {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.medium-link:hover {
    background: rgba(59, 130, 246, 0.2);
}

.hard-link {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.hard-link:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Hide the current difficulty */
body[data-difficulty="easy"] .easy-link,
body[data-difficulty="medium"] .medium-link,
body[data-difficulty="hard"] .hard-link {
    display: none;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .difficulty-links {
        background: #1e293b;
    }

    .easy-link {
        background: rgba(34, 197, 94, 0.2);
        color: #4ade80;
    }

    .easy-link:hover {
        background: rgba(34, 197, 94, 0.3);
    }

    .medium-link {
        background: rgba(59, 130, 246, 0.2);
        color: #60a5fa;
    }

    .medium-link:hover {
        background: rgba(59, 130, 246, 0.3);
    }

    .hard-link {
        background: rgba(239, 68, 68, 0.2);
        color: #f87171;
    }

    .hard-link:hover {
        background: rgba(239, 68, 68, 0.3);
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .difficulty-links {
        padding: 6px 12px;
    }

    .difficulty-link {
        padding: 5px 10px;
    }

    .difficulty-name {
        font-size: 14px;
    }

    .difficulty-icon {
        font-size: 16px;
    }
}



/* Make search input look less like a typical input to reduce expectation of keyboard */
.search-input {
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    pointer-events: auto; /* Allow clicks but prevent default behavior with JS */
    cursor: text;
  }
  
  /* Add a hint that typing is optional */
  .search-input::placeholder {
    content: "Scroll or type to filter...";
  }
  
  /* Improve scrolling for all users */
  .search-results {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    max-height: 60vh;
    scroll-behavior: smooth;
    scrollbar-width: thin;
  }
  
  /* Make items more tappable */
  .search-item {
    padding: 14px 16px;
    min-height: 48px; /* Minimum height for good touch targets */
    transition: background-color 0.15s ease;
  }
  
  .search-item:active {
    background-color: rgba(59, 130, 246, 0.1);
  }
  
  /* Enhance category selection visuals */
  .category-selection .search-item {
    border-radius: 8px;
    margin: 4px 8px;
    border: 1px solid #e5e7eb;
  }
  
  /* Make back button more prominent */
  .search-back-button {
    padding: 12px 16px;
    font-weight: 600;
    background-color: #f3f4f6;
    border-radius: 6px;
    margin: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .search-back-button svg {
    margin-right: 8px;
  }
  
  /* Dark mode enhancements */
  @media (prefers-color-scheme: dark) {
    .search-input {
      background-color: #1e293b;
      border-color: #475569;
      color: #f1f5f9;
    }
    
    .search-item:active {
      background-color: rgba(59, 130, 246, 0.2);
    }
    
    .search-back-button {
      background-color: #334155;
    }
  }