/* ==========================================================================
   StudyMate - Modern Engineering Notes Management Platform CSS
   ========================================================================== */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-glow: rgba(79, 70, 229, 0.25);
    
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --info: #0ea5e9;
    --info-light: #f0f9ff;
    
    --year-1: #059669;
    --year-1-grad: linear-gradient(135deg, #10b981 0%, #047857 100%);
    --year-2: #2563eb;
    --year-2-grad: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --year-3: #7c3aed;
    --year-3-grad: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    --year-4: #ea580c;
    --year-4-grad: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
    --quantum-grad: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f5f9;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 16px 30px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* Modern Navbar */
.navbar-modern {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 14px 0;
    transition: all 0.3s ease;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--text-main) !important;
    letter-spacing: -0.5px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--primary-glow);
    font-size: 1.1rem;
}

.nav-link-modern {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-muted) !important;
    padding: 8px 14px !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-link-modern:hover, .nav-link-modern.active {
    color: var(--primary) !important;
    background: var(--primary-light);
}

.quantum-badge-nav {
    background: linear-gradient(135deg, #ec4899, #be185d);
    color: white !important;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hero Section */
.hero-wrapper {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #31104b 100%);
    color: white;
    padding: 80px 0 90px;
    position: relative;
    overflow: hidden;
}

.hero-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.hero-wrapper::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: #e0e7ff;
    margin-bottom: 20px;
}

.hero-title {
    font-weight: 800;
    font-size: 3.2rem;
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    max-width: 640px;
    margin: 0 auto 36px;
}

/* Modern Search Box */
.search-container {
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.search-box {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--radius-full);
    padding: 6px 8px 6px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 12px 35px var(--primary-glow);
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1rem;
    color: var(--text-main);
    background: transparent;
    padding: 8px 12px;
}

.search-box button {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 10px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.search-box button:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Hero Stats */
.hero-stats-row {
    display: flex;
    justify-content: center;
    gap: 36px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Modern Year Cards */
.year-card-modern {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.year-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.year-card-modern.year-1::before { background: var(--year-1-grad); }
.year-card-modern.year-2::before { background: var(--year-2-grad); }
.year-card-modern.year-3::before { background: var(--year-3-grad); }
.year-card-modern.year-4::before { background: var(--year-4-grad); }
.year-card-modern.quantum::before { background: var(--quantum-grad); }

.year-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(99, 102, 241, 0.4);
}

.year-icon-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: white;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.year-card-modern:hover .year-icon-wrapper {
    transform: scale(1.1) rotate(4deg);
}

.year-1 .year-icon-wrapper { background: var(--year-1-grad); }
.year-2 .year-icon-wrapper { background: var(--year-2-grad); }
.year-3 .year-icon-wrapper { background: var(--year-3-grad); }
.year-4 .year-icon-wrapper { background: var(--year-4-grad); }
.quantum .year-icon-wrapper { background: var(--quantum-grad); }

.year-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.year-card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.btn-year-action {
    background: var(--bg-surface-alt);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    display: block;
    width: 100%;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.year-card-modern:hover .btn-year-action {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Note Card Modern */
.note-card-modern {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.note-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.note-card-header {
    padding: 16px 18px;
    background: #ffffff;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.file-type-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.note-header-text {
    flex: 1;
    min-width: 0;
}

.note-title-heading {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.pill-subject {
    font-size: 0.72rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.pill-chapter {
    font-size: 0.72rem;
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.note-card-body {
    padding: 12px 18px 16px;
    margin-top: auto;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.note-upload-info {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.btn-download-modern {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-download-modern:hover {
    background: var(--primary-hover);
    color: white;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.btn-delete-badge {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-delete-badge:hover {
    background: var(--danger);
    color: white;
}

/* Feature Cards */
.feature-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.feature-box h4 {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.feature-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Modern Form Cards (Upload, Login, Signup) */
.form-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.form-card-header {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    padding: 28px 32px;
}

.form-card-body {
    padding: 32px;
}

.form-label-modern {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-control-modern, .form-select-modern {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.95rem;
    width: 100%;
    color: var(--text-main);
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.form-control-modern:focus, .form-select-modern:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Drag and drop upload zone */
.dropzone-container {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    background: #f8fafc;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.dropzone-container:hover, .dropzone-container.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.dropzone-container input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.file-selected-indicator {
    background: var(--success-light);
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Modern Button */
.btn-primary-modern {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px var(--primary-glow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--primary-glow);
    color: white;
}

/* Breadcrumbs & Page Headers */
.page-header-banner {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    padding: 44px 0;
    margin-bottom: 36px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.page-header-banner.quantum-theme {
    background: linear-gradient(135deg, #31104b, #180927);
}

/* Footer */
.footer-modern {
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 0 24px;
    margin-top: auto;
    border-top: 1px solid #1e293b;
}

.footer-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.footer-links a {
    color: #94a3b8;
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 4px;
}

.social-pill {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: #1e293b;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.social-pill:hover {
    background: var(--primary);
    transform: translateY(-3px);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-wrapper {
        padding: 50px 0 60px;
    }
    .search-box {
        padding: 4px 6px 4px 14px;
    }
}
