/* ==================== ROOT VARIABLES ==================== */
:root {
    --brand-blue: #1a377a;
    --brand-green: #63a79b;
    --primary: var(--brand-blue);
    --primary-dark: #102453;
    --secondary: var(--brand-green);
    --accent: #fdec2e;
    /* Firefly yellow */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== VISUAL UPDATES ==================== */
.brand-apna {
    color: var(--brand-blue) !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}

.brand-skills {
    color: var(--brand-green) !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}

.brand-logo-img {
    height: 40px;
    width: auto;
    vertical-align: middle;
    margin-right: 10px;
    border-radius: 6px;
}

/* Firefly Animation */
.firefly {
    position: fixed;
    border-radius: 50%;
    background-color: #fdec2e;
    box-shadow: 0 0 10px 2px #fdec2e, 0 0 20px 5px #ffeb3b;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.8;
    animation: fly 15s linear infinite;
}

@keyframes fly {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }

    25% {
        transform: translate(100px, -50px) scale(1.2);
        opacity: 0.6;
    }

    50% {
        transform: translate(50px, 100px) scale(0.8);
        opacity: 0.9;
    }

    75% {
        transform: translate(-50px, 50px) scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Wide linear gradient background */
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-green) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==================== UTILITY CLASSES ==================== */
.hidden {
    display: none !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-google {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-md);
}

.btn-google:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

/* ==================== LOGIN PAGE ==================== */
#loginPage {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

#loginPage::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -250px;
    right: -250px;
}

/* ==================== LOGIN PAGE ==================== */
#loginPage {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Use the same gradient as body, or transparent if body covers it */
    background: transparent;
    position: relative;
    overflow: hidden;
}

#loginPage::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -250px;
    right: -250px;
}

#loginPage::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
}

.login-container {
    background: white;
    padding: 60px 50px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 450px;
    width: 90%;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 40px;
}

/* ==================== HEADER/NAVBAR ==================== */
header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-brand {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.user-profile:hover {
    background: var(--bg-tertiary);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

/* ==================== MAIN CONTENT SECTIONS ==================== */
.page-section {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 80px 20px;
    text-align: center;
    border-radius: 0 0 50% 50% / 0 0 20px 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
}

/* ==================== SEARCH SECTION ==================== */
.search-container {
    background: white;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin: -50px auto 40px;
    max-width: 900px;
    position: relative;
    z-index: 10;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.input-group label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
}

.input-group input,
.input-group select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    transition: var(--transition);
    width: 100%;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Suggestions Dropdown */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    margin-top: -8px;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--bg-tertiary);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.suggestion-item.custom-option {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--primary);
}

.suggestion-item.custom-option:hover {
    background: var(--primary);
    color: white;
}

/* ==================== CATEGORIES GRID ==================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 40px;
}

.category-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.category-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.category-count {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ==================== WHY APNASKILLS SECTION ==================== */
.why-section {
    margin: 60px 0;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary);
}

.feature-desc {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ==================== TUTOR CARDS ==================== */
.tutors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.tutor-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.tutor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.tutor-header {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.tutor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.tutor-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.tutor-specialization {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

.tutor-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: var(--warning);
    font-size: 14px;
}

.tutor-details {
    margin: 20px 0;
}

.tutor-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-tertiary);
}

.tutor-detail-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.tutor-detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

.tutor-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin: 20px 0;
}

/* ==================== MODAL ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 2px solid var(--bg-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 2px solid var(--bg-tertiary);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ==================== FORM ELEMENTS ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ==================== BOOKINGS SECTION ==================== */
.bookings-container {
    background: white;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.bookings-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--bg-tertiary);
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.booking-card {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    border-left: 4px solid var(--primary);
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.booking-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-accepted {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.status-completed {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

/* ==================== NOTIFICATIONS ==================== */
.notification-item {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.notification-item:hover {
    box-shadow: var(--shadow-md);
}

.notification-item.unread {
    background: rgba(99, 102, 241, 0.05);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notification-time {
    font-size: 12px;
    color: var(--text-light);
}

/* ==================== BECOME TUTOR BANNER ==================== */
.become-tutor-banner {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: white;
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
    margin: 40px 0;
}

.become-tutor-banner h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

.become-tutor-banner p {
    font-size: 18px;
    margin-bottom: 24px;
    opacity: 0.95;
}

/* ==================== RATING STARS ==================== */
.rating-input {
    display: flex;
    gap: 8px;
    font-size: 32px;
}

.rating-input span {
    cursor: pointer;
    color: var(--border);
    transition: var(--transition);
}

.rating-input span:hover,
.rating-input span.active {
    color: var(--warning);
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .search-form {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 32px;
    }

    .nav-menu {
        gap: 16px;
        font-size: 14px;
        flex-wrap: wrap;
    }

    .tutors-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .nav-brand {
        font-size: 22px;
    }

    .login-container {
        padding: 40px 30px;
    }
}

/* ==================== LOADING SPINNER ==================== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
