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

:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(15, 23, 42, 0.85);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Navbar */
header {
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 1px;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #fff;
}

.btn {
    background: var(--accent-color);
    color: #fff !important;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: inline-block;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-color) !important;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.2);
}

main {
    flex: 1;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    width: 100%;
}

/* Messages */
.messages {
    margin-bottom: 2rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #bfdbfe;
    animation: fadeInDown 0.5s ease;
}

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

/* Glassmorphism Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.card h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #fff;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* Forms */
.auth-container {
    max-width: 500px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.form-input, .form-textarea, .form-file {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.helptext {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.5rem;
    display: block;
}

/* Footer */
footer {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid var(--card-border);
    padding: 2.5rem;
    text-align: center;
    margin-top: auto;
}

footer p {
    color: #94a3b8;
    font-size: 0.95rem;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #60a5fa;
}

/* Misc */
.page-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-muted {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 101;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 4px 0;
    transition: 0.3s ease;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-container {
        justify-content: space-between;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--nav-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.4s ease;
        z-index: 99;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .page-header h1 {
        font-size: 1.5rem !important;
    }

    /* Reduce margins, padding, and font sizes */
    body {
        font-size: 0.9rem !important;
    }
    
    main {
        margin: 1rem 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Aggressively target cards, containers, and inline wrappers to force 100% width on mobile */
    .card, .auth-container, div[style*="padding: 3rem"], div[style*="max-width"] {
        padding: 1rem !important;
        margin: 0 0 1rem 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        background: rgba(255, 255, 255, 0.01) !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .grid, div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 0.5rem !important;
    }
    
    .form-input, .form-textarea, .form-file {
        padding: 0.6rem !important;
    }
    
    .nav-container {
        padding: 0.8rem 1rem !important;
    }
    
    footer {
        padding: 1.5rem 1rem !important;
    }

    /* Hamburger animation */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }
}
