/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== FLASH MESSAGES ===== */
.flash-notice,
.flash-alert {
    padding: 1rem 2rem;
    text-align: center;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

.flash-notice {
    background-color: #d1fae5;
    color: #065f46;
    border-bottom: 2px solid #a7f3d0;
}

.flash-alert {
    background-color: #f8d7da;
    color: #721c24;
    border-bottom: 2px solid #f5c6cb;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== HEADER & NAVIGATION ===== */
.site-header {
    background: linear-gradient(135deg, #6ee7b7 0%, #34d399 50%, #10b981 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    flex-wrap: wrap;
}

/* ===== BRAND LOGO ===== */
.navbar-brand {
    margin-right: auto;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    transition: transform 0.2s;
}

.brand-logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 2rem;
    background: white;
    color: #10b981;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.logo-text {
    letter-spacing: 0.5px;
}

/* ===== NAVIGATION SECTIONS ===== */
.navbar-main,
.navbar-admin,
.navbar-user,
.navbar-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-admin {
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0 1rem;
}

/* ===== NAVIGATION LINKS ===== */
.nav-link {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    color: #1f2937;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ===== SPECIAL NAVIGATION BUTTONS ===== */
.nav-learn {
    background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 20%);
    box-shadow: 0 3px 10px rgba(167, 139, 250, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: bold;
    padding: 0.7rem 1.4rem;
    font-size: 1rem;
}

.nav-learn:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 20%);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 5px 14px rgba(167, 139, 250, 0.4);
}

.nav-review {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
    box-shadow: 0 3px 10px rgba(147, 197, 253, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
    padding: 0.7rem 1.4rem;
    font-size: 1rem;
}

.nav-review:hover {
    background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 5px 14px rgba(147, 197, 253, 0.4);
}

.nav-admin {
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem;
}

/* ===== LOGOUT BUTTON ===== */
.btn-logout {
    padding: 0.6rem 1.2rem;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background-color: #c82333;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===== AUTH BUTTONS ===== */
.btn-signup {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

.btn-signup:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-login {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-login:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== FOOTER ===== */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
    font-size: 0.9rem;
}

.site-footer p {
    margin: 0;
}

/* ===== SETTINGS SECTION ===== */
section.settings {
    display: flex;
    gap: 2rem;
}

section.settings nav {
    width: 250px;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

section.settings nav a {
    display: block;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: #333;
    border-radius: 6px;
    transition: all 0.2s;
}

section.settings nav a:hover {
    background-color: #10b981;
    color: white;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .navbar {
        gap: 1rem;
        padding: 0.75rem 1.5rem;
    }

    .navbar-admin {
        border: none;
        padding: 0;
    }
}

@media (max-width: 992px) {
    .navbar {
        flex-direction: column;
        align-items: stretch;
    }

    .navbar-brand {
        margin-right: 0;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .navbar-main,
    .navbar-admin,
    .navbar-user,
    .navbar-auth {
        flex-wrap: wrap;
        justify-content: center;
        border: none;
        padding: 0;
    }

    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .brand-logo {
        font-size: 1.2rem;
    }

    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }

    .btn-logout {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}
