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

:root {
    --primary-gradient: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    --secondary-color: #4a90e2;
    --accent-color: #ff4d4d;
    --text-color: #ffffff;
    --dark-overlay: rgba(0, 0, 0, 0.7);
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.18);
    --button-glow: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    --navbar-height: 70px;
    --navbar-mobile-height: 60px;
    --footer-height: 60px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--primary-gradient);
    color: var(--text-color);
    position: relative;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: var(--navbar-height);
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    display: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: transparent;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-item i {
    font-size: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.install-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse 1.5s infinite;
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 77, 77, 0.5);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 77, 77, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}

/* ===== MAIN CONTENT ===== */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: calc(var(--navbar-height) + 20px) 20px var(--footer-height);
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.title-container {
    text-align: center;
    margin-bottom: 20px;
}

h1, h2 {
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

h2 {
    font-size: 2.3rem;
    font-weight: 600;
}

.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease;
}

.login-form:hover {
    transform: translateY(-5px);
}

.game-image {
    width: 150px;
    height: auto;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.progress-info {
    width: 100%;
    text-align: center;
    margin: 10px 0;
}

.saved-progress {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.saved-progress.has-progress {
    background-color: rgba(74, 144, 226, 0.3);
    border-left: 4px solid var(--secondary-color);
}

.login-button {
    width: 220px;
    height: 50px;
    border: none;
    outline: none;
    color: #fff;
    background: #111;
    cursor: pointer;
    position: relative;
    z-index: 0;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-button i {
    font-size: 1.2rem;
}

.login-button:before {
    content: '';
    background: var(--button-glow);
    position: absolute;
    top: -2px;
    left:-2px;
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    animation: glowing 20s linear infinite;
    opacity: 0;
    transition: opacity .3s ease-in-out;
    border-radius: 10px;
}

.login-button:active {
    color: #000;
}

.login-button:active:after {
    background: transparent;
}

.login-button:hover:before {
    opacity: 1;
}

.login-button:after {
    z-index: -1;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #111;
    left: 0;
    top: 0;
    border-radius: 10px;
}

@keyframes glowing {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

/* ===== FOOTER ===== */
footer {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-color);
    width: 100%;
    height: var(--footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-content {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 0 20px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-divider {
    color: rgba(255, 255, 255, 0.5);
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== PWA PROMPT ===== */
.pwa-prompt {
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    text-align: center;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pwa-prompt p {
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pwa-install-btn {
    background: linear-gradient(45deg, #ff4d4d, #f86a6a);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(255, 77, 77, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.7);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (min-width: 768px) {
    .logo-text {
        display: block;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: var(--navbar-mobile-height);
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: var(--navbar-mobile-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 20px;
        gap: 10px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-item {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
    
    .install-btn {
        width: 100%;
        justify-content: center;
    }
    
    main {
        padding-top: calc(var(--navbar-mobile-height) + 20px);
    }
    
    .login-form {
        width: 100%;
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .game-image {
        width: 120px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .login-button {
        width: 100%;
    }
    
    .footer-content {
        flex-direction: column-reverse;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 5px;
    }
    
    .footer-divider {
        display: none;
    }
}