/* 
   Theme: Nebula Academic
   Author: RateMyBitsProf AI
*/

:root {
    /* Colors */
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-glass: rgba(15, 23, 42, 0.6);

    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --secondary: #818cf8;
    --accent: #f472b6;

    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;

    --success: #34d399;
    --error: #f87171;
    --warning: #fbbf24;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --border-glass: 1px solid rgba(255, 255, 255, 0.1);

    /* Effects */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --glow-primary: 0 0 20px rgba(56, 189, 248, 0.3);
    --backdrop-blur: blur(12px);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(129, 140, 248, 0.1) 0%, transparent 40%);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

/* Layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

.main-content {
    flex: 1;
    padding-top: 80px;
    /* Navbar height */
    padding-bottom: var(--spacing-xl);
}

/* Glassmorphism Utilities */
.glass {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: var(--border-glass);
    box-shadow: var(--shadow-lg);
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Navbar - Modern CSS Grid Layout */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 72px;
    z-index: 1000;

    /* Glassmorphism */
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    /* Borders & Shadows */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Navbar Inner Container - Full width for spread out look */
.navbar-inner,
.navbar .container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    width: 100%;
    height: 100%;
    max-width: 100%;
    /* Override default container max-width */
    padding: 0 3rem;
    /* Add more horizontal padding */
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    color: var(--warning);
    font-size: 1.75rem;
}

.highlight {
    color: var(--primary);
}

/* Navigation Links - Centered */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 2vw, 2.5rem);
}

.nav-link {
    position: relative;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(56, 189, 248, 0.12);
    transform: translateY(-1px);
}

/* Auth Buttons - Right aligned */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-self: end;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 0.95rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(56, 189, 248, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-text {
    background: transparent;
    color: var(--text-light);
    padding: 0.7rem 1.2rem;
}

.btn-text:hover {
    color: var(--primary);
    background: rgba(56, 189, 248, 0.1);
}

/* Footer - Modern Layout */
.footer {
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: clamp(2rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2rem);
    margin-top: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Footer Content - Spread out layout */
.footer .container {
    max-width: 100%;
    padding: 0 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
    margin-bottom: 3rem;
    width: 100%;
}

/* Footer Brand */
.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
    background: linear-gradient(135deg, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 320px;
    font-size: 0.95rem;
}

/* Footer Links - Flexbox for groups */
.footer-links {
    display: flex;
    gap: clamp(2rem, 4vw, 4rem);
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Link Group */
.link-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 140px;
}

.link-group h4 {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.link-group a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.25s ease;
    padding: 0.25rem 0;
}

.link-group a:hover {
    color: var(--primary);
    padding-left: 0.5rem;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: clamp(1rem, 2vw, 1.5rem);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Alerts */
.messages-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

.alert-success {
    background: rgba(52, 211, 153, 0.2);
    border-color: var(--success);
}

.alert-error {
    background: rgba(248, 113, 113, 0.2);
    border-color: var(--error);
}

.alert-info {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--primary);
}

.close-btn {
    background: none;
    border: none;
    color: white;
    margin-left: auto;
    cursor: pointer;
    font-size: 1.2rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

/* Responsive */
@media (max-width: 768px) {

    /* Navbar Mobile Layout */
    .navbar-inner,
    .navbar .container {
        grid-template-columns: 1fr auto;
        padding: 0 1.5rem;
        max-width: 100%;
    }

    /* Hide desktop nav elements by default */
    .nav-links,
    .nav-auth {
        display: none;
        position: fixed;
        top: 72px;
        /* Match new navbar height */
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    /* Show when active */
    .nav-links.mobile-active {
        display: flex;
        align-items: flex-start;
        /* Align links to left */
    }

    .nav-auth.mobile-active {
        display: flex;
        top: auto;
        bottom: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: none;
        justify-content: center;
        /* Center auth buttons */
        padding: 1.5rem;
    }

    .nav-link {
        font-size: 1.1rem;
        width: 100%;
    }

    .mobile-menu-btn {
        display: flex;
        margin-left: auto;
        /* Push to right */
    }

    /* Footer Mobile Layout */
    .footer .container {
        padding: 0 1.5rem;
    }

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

    .footer-links {
        justify-content: flex-start;
        gap: 2.5rem;
    }

    .inline-form,
    .inline-form button {
        width: 100%;
    }

    .messages-container {
        right: 10px;
        left: 10px;
        top: 85px;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inline form utility */
.inline-form {
    display: inline;
}