@font-face {
    font-family: 'Dune';
    src: url(https://subhrachakraborti.com/fonts/Dune.woff2);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Loader Animation */
.loader {
    font-family: 'Dune', sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
}

.loader-letters {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.loader span {
    display: inline-block;
    font-size: 60px;
    font-weight: bold;
    color: #e50914;
    text-transform: uppercase;
    margin: 0 2px;
    animation: letter-animation 3s ease-in-out forwards, letter-glow 1.5s ease-in-out infinite alternate;
}

.loader h3 {
    color: #e50914;
    font-size: 24px;
    letter-spacing: 2px;
    opacity: 0;
    animation: fade-in 1s ease-in-out 1.5s forwards;
}

@keyframes letter-animation {
    0% {
        opacity: 0;
        transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
    }
    40% {
        opacity: 0.6;
        transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
    }
    70% {
        opacity: 0.8;
        transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
    }
    100% {
        opacity: 1;
        transform: perspective(400px) rotate3d(0, 0, 0, 0);
    }
}

@keyframes letter-glow {
    0% {
        text-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
        color: #e50914;
        transform: scale(1);
    }
    100% {
        text-shadow: 0 0 25px rgba(229, 9, 20, 1);
        color: #ff3b3b;
        transform: scale(1.05);
    }
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.loader span:nth-child(1) { animation-delay: 0.1s; }
.loader span:nth-child(2) { animation-delay: 0.2s; }
.loader span:nth-child(3) { animation-delay: 0.3s; }
.loader span:nth-child(4) { animation-delay: 0.4s; }
.loader span:nth-child(5) { animation-delay: 0.5s; }
.loader span:nth-child(6) { animation-delay: 0.6s; }
.loader span:nth-child(7) { animation-delay: 0.7s; }
.loader span:nth-child(8) { animation-delay: 0.8s; }

.main-content {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Navbar */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    color: #e50914;
}

.navbar-toggler {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #333;
}

.navbar-menu {
    display: flex;
}

.navbar-nav {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-item {
    margin-left: 25px;
}

.nav-link {
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #e50914;
}

/* Login Form and Popup*/
#login-btn, #logout-btn {
    background-color: #e50914;
    color: white;
    display: flex;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 600;
    justify-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.logs {
    display: flex;
    align-items: center;
}

#login-btn:hover, #logout-btn:hover {
    background-color: #c50914;
    transform: translateY(-3px);
}

#user-info {
    font-weight: 600;
    color: #857a7a;
}

.btn-google {
    background-color: transparent;
    color: white;
    display: block;
    margin: 10px auto;
    border: 2px solid #db4437;
    justify-items: center;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-google:hover {
    transform: translateY(-1.5px);
}

.btn-google p {
    margin: 0;
}

.popup-overlay {
    position: fixed;
    text-align: center;
    justify-items: center;
    color: #fff;
}

.popup-overlay a:hover {
    color: #fff;
    text-decoration: underline;
    cursor: pointer;
}

#emailLoginForm input,
#emailSignupForm input {
    margin: 10px auto;
    display: block;
    width: 85%;
    padding: 10px;
    border: 2px solid #e50914;
    border-radius: 5px;
    text-align: center;
    font-size: 1rem;
}

.btn-close{
    position: absolute;
    top: 5%;
    right: 7%;
    background: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #e50914, #db0000);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Categories Section */
.categories-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: #e50914;
    font-size: 2rem;
    font-weight: 700;
}

.cards-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.card {
    background-color: #fff;
    border: 1px solid #aaa;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    height: 100%;
    padding: 20px;
    width: 25vw;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-title {
    color: #e50914;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.card-text {
    color: #555;
    margin-bottom: 20px;
}

.leaderboard-section {
    padding: 40px 0 60px;
    background-color: #f0f2f5;
}

.leaderboard-data-class {
    text-align: center;
}

.leaderboard-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.leaderboard-display {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.leaderboard-display h3 {
    text-align: center;
    color: #e50914;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.leaderboard-list {
    padding-left: 20px;
}

.leaderboard-item {
    padding: 8px 5px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-item .rank {
    font-weight: bold;
    margin-right: 15px;
    min-width: 35px;
}

.leaderboard-item .name {
    flex-grow: 1;
}

.leaderboard-item .score {
    font-weight: bold;
    color: #e50914;
}

.top-rank {
    font-weight: 600;
    background-color: #fff9f9;
}

/* Footer */
footer {
    background-color: #222;
    color: #fff;
    padding: 50px 0 30px;
    text-align: center;
}

footer h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

footer p {
    margin-bottom: 15px;
    color: #ccc;
}

footer a {
    color: #fff;
    transition: color 0.2s;
}

footer a:hover {
    color: #e50914;
}

.social-icons {
    margin: 20px 0;
}

.social-icons a {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: transform 0.3s, color 0.2s;
    display: inline-block;
}

.social-icons a:hover {
    color: #e50914;
    transform: translateY(-3px);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .card {
        width: 90%;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
      }

      #menu-toggle {
        display: block;
      }
      
      .navbar-toggler {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        font-size: 1.5rem;
      }
      
      .navbar-menu {
        position: fixed;
        top: 75px;
        left: 0;
        width: 100%;
        background-color: #1a1a1a;
        height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      }

      .nav-link {
        padding: 0.5rem 1rem;
        color: #f8f9fa;
      }
      
      .navbar-menu.show-mobile {
        height: auto;
        padding: 1rem 0;
      }
      
      .navbar-nav {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
      }
      
      .nav-item {
        margin: 0.5rem 0;
        text-align: center;
        width: 100%;
      }
      
      .nav-link {
        display: block;
        padding: 0.5rem 0;
      }
      
      #login-btn, #logout-btn {
        width: 100%;
        margin-top: 0.5rem;
      }
      
      #user-info {
        text-align: center;
        padding: 0.5rem 0;
        color: #bbb2f9;
      }
    
    .card {
        width: 90%;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .loader span {
        font-size: 40px;
    }
}

@media (max-width: 576px) {
    .container {
        width: 95%;
    }
    
    .hero-section {
        padding: 60px 0;
    }

    .card {
        width: 90%;
    }
    
    .hero-title {
        font-size: 1.7rem;
    }
}

/* Full-Screen Overlay for Dropdowns & Popups */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 999999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.popup-overlay.show {
    display: flex;
    visibility: visible;
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.dropbtn {
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.dropbtn:hover, .dropbtn:focus {
    background-color: #c50914;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dropdown-content {
    display: none;
    width: 100%;
    background: rgba(0, 0, 0, 1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    margin: 10px 0;
    border-radius: 10px;
    color: #fff;
    justify-items: center;
}

.dropdown-content a {
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    color: #c50914;
}

#gamesDropdown.show, #productivityDropdown.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
    background: #333;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
}

.btn {
    background-color: #fff9f9;
    color: #e50914;
    padding: 10px 20px;
    font-size: 16px;
    border: 1px solid #e50914;
    cursor: pointer;
    width: 10rem;
    border-radius: 5px;
}

.btn:hover, .btn:focus {
    transform: translateY(-1.5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #000;
}