/* ========================================
   PART 1 — GLOBAL THEME AND PAGE LAYOUT
======================================== */

@import url(
    "https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap"
);


:root {
    --bg: #f4f9ff;
    --surface: #ffffff;
    --card: #ffffff;
    --card-hover: #edf5ff;

    --border: #dbeaf2;
    --border-light: rgba(35, 85, 135, 0.12);

    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.10);

    --accent-secondary: #38bdf8;
    --accent-secondary-soft: rgba(56, 189, 248, 0.12);

    --text: #142d4e;
    --text-soft: #334e68;
    --muted: #526780;

    --success: #15803d;
    --warning: #d97706;
    --danger: #dc2626;

    --page-width: 1180px;
    --radius-small: 10px;
    --radius-medium: 16px;
    --radius-large: 22px;

    --shadow-card: 0 8px 28px rgba(35, 85, 135, 0.08);
}

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

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    padding: 24px;

    position: relative;
    overflow-x: hidden;

    color: var(--text);
    background: var(--bg);

    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

/* ========================================
   MAIN NAVIGATION HEADER
======================================== */

.site-header {
    width: min(100%, 1480px);
    min-height: 86px;
    margin: 0 auto 46px;
    padding: 18px 24px;

    position: relative;
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: rgba(17, 17, 24, 0.92);
    border: 1px solid var(--border);
    border-radius: 20px;

    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
}

.logo-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(
        135deg,
        var(--accent),
        var(--accent-secondary)
    );

    border-radius: 9px;
    font-size: 16px;
}

.logo-text {
    color: var(--text);

    font-family: "Syne", sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-text span {
    color: var(--accent);
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 38px;
    margin-left: auto;
}

.nav-link {
    min-height: auto;
    padding: 8px 0;

    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;

    color: var(--muted);

    font-family: "DM Sans", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;

    cursor: pointer;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.nav-link:hover {
    color: var(--text);
    background: none;
    border: none;
    box-shadow: none;
    filter: none;

    transform: translateY(-1px);
}

.nav-link.active {
    color: #ffffff;
}

.nav-link.logout-link {
    color: var(--danger);
}

.nav-link.logout-link:hover {
    color: #ff8da4;
}

body::before,
body::after {
    content: "";

    position: fixed;
    z-index: -1;

    border-radius: 50%;
    filter: blur(110px);

    pointer-events: none;
    opacity: 0.18;
}

body::before {
    width: 520px;
    height: 520px;

    top: -210px;
    left: -180px;

    background: var(--accent);
}

body::after {
    width: 460px;
    height: 460px;

    right: -170px;
    bottom: -190px;

    background: var(--accent-secondary);
}

body > hr,
#mentorSection,
#menteeSection,
#videoModal {
    width: min(100%, var(--page-width));
    margin-left: auto;
    margin-right: auto;
}

h2,
h3 {
    font-family: "Syne", sans-serif;
    color: var(--text);
}

h1 {
    margin-bottom: 20px;
    padding-left: 54px;

    position: relative;

    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.045em;
}
h2 {
    margin-bottom: 22px;

    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

h2::after {
    content: "";

    width: 52px;
    height: 3px;

    display: block;
    margin-top: 9px;

    border-radius: 999px;

    background: linear-gradient(
        90deg,
        var(--accent),
        var(--accent-secondary)
    );
}

h3 {
    margin-bottom: 16px;

    font-size: 1rem;
    font-weight: 600;
}

p {
    color: var(--text-soft);
}

hr {
    height: 1px;
    margin-top: 24px;
    margin-bottom: 24px;

    border: 0;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.13),
        transparent
    );
}

[style*="display:none"],
[style*="display: none"] {
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

#userInfo {
    margin-bottom: 18px;
    padding: 22px;

    position: relative;
    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            rgba(108, 99, 255, 0.1),
            transparent 48%
        ),
        rgba(20, 20, 31, 0.92);

    border: 1px solid var(--border);
    border-radius: var(--radius-medium);

    box-shadow:
        var(--shadow-card),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#userInfo h3 {
    margin-bottom: 14px;
}

#userInfo p {
    min-height: 44px;
    margin-top: 8px;
    padding: 10px 13px;

    display: grid;
    grid-template-columns: 80px 1fr;
    align-items: center;
    gap: 12px;

    color: var(--muted);
    background: rgba(255, 255, 255, 0.025);

    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: var(--radius-small);

    font-size: 0.86rem;
}

#userInfo span {
    color: var(--text);
    font-weight: 600;
    overflow-wrap: anywhere;
}

#userRole {
    width: fit-content;
    padding: 4px 10px;

    display: inline-flex;

    border: 1px solid rgba(108, 99, 255, 0.24);
    border-radius: 999px;

    color: #c8c5ff;
    background: var(--accent-soft);

    font-size: 0.76rem;
    text-transform: capitalize;
}

/* ========================================
   PART 2 — SECTIONS, FORMS AND BUTTONS
======================================== */

#mentorSection,
#menteeSection {
    padding: 28px;

    position: relative;
    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            rgba(108, 99, 255, 0.08),
            transparent 42%
        ),
        rgba(20, 20, 31, 0.94);

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    box-shadow:
        var(--shadow-card),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#mentorSection > div,
#menteeSection > div {
    margin-bottom: 14px;
}

label {
    margin-bottom: 7px;

    display: block;

    color: var(--text-soft);

    font-size: 0.83rem;
    font-weight: 600;
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;

    outline: none;

    color: var(--text);
    background: rgba(255, 255, 255, 0.035);

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 11px;

    font: inherit;
    font-size: 0.88rem;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

input:hover,
select:hover {
    border-color: rgba(108, 99, 255, 0.28);
}

input:focus,
select:focus {
    background: rgba(108, 99, 255, 0.06);
    border-color: var(--accent);

    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}

select option {
    color: var(--text);
    background: var(--surface);
}

input[type="date"],
input[type="time"] {
    color-scheme: dark;
}

button {
    min-height: 44px;
    padding: 10px 17px;

    border: 1px solid rgba(108, 99, 255, 0.34);
    border-radius: 10px;

    color: #ffffff;
    background: linear-gradient(
        135deg,
        var(--accent),
        #8179ff
    );

    font-family: "DM Sans", sans-serif;
    font-size: 0.86rem;
    font-weight: 600;

    cursor: pointer;

    box-shadow:
        0 10px 24px rgba(108, 99, 255, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);

    transition:
        transform 0.18s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        filter 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);

    box-shadow:
        0 14px 30px rgba(108, 99, 255, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.17);
}

button:active {
    transform: translateY(0);
}

button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

#createAvailabilityBtn,
#loadSlotsBtn {
    margin-top: 4px;
}

table button {
    min-height: 34px;
    padding: 7px 12px;

    font-size: 0.77rem;
}

#availabilityTable button,
#bookingsTable td:last-child button {
    color: #ff9caf;
    background: rgba(255, 101, 132, 0.09);

    border-color: rgba(255, 101, 132, 0.24);

    box-shadow: none;
}

#availabilityTable button:hover,
#bookingsTable td:last-child button:hover {
    color: #ffffff;
    background: rgba(255, 101, 132, 0.18);

    border-color: rgba(255, 101, 132, 0.38);

    box-shadow: 0 10px 22px rgba(255, 101, 132, 0.12);
}

#slotsTable button,
#bookingsTable td:nth-last-child(2) button {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        var(--accent),
        #8179ff
    );
}

/* ========================================
   PART 3 — TABLES, VIDEO MODAL, RESPONSIVE
======================================== */

table {
    width: 100%;

    border-collapse: separate;
    border-spacing: 0;

    overflow: hidden;

    background: rgba(10, 10, 15, 0.32);

    border: 1px solid var(--border) !important;
    border-radius: var(--radius-medium);

    color: var(--text-soft);

    font-size: 0.83rem;
}

thead {
    background:
        linear-gradient(
            135deg,
            rgba(108, 99, 255, 0.13),
            rgba(255, 101, 132, 0.05)
        ),
        var(--surface);
}

th {
    padding: 13px 12px;

    color: var(--text);

    border: 0 !important;
    border-bottom: 1px solid var(--border) !important;

    font-family: "Syne", sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: left;
}

td {
    padding: 12px;

    color: var(--text-soft);

    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055) !important;

    vertical-align: middle;
}

tbody tr {
    background: rgba(255, 255, 255, 0.012);

    transition:
        background 0.2s ease,
        transform 0.18s ease;
}

tbody tr:hover {
    background: rgba(108, 99, 255, 0.055);
}

tbody tr:last-child td {
    border-bottom: 0 !important;
}

td:empty::after {
    content: "—";
    color: var(--muted);
}

#videoModal {
    margin-top: 24px;
    padding: 28px !important;

    position: fixed;
    z-index: 1000;
    inset: 50% auto auto 50%;

    max-width: 760px;
    max-height: calc(100vh - 40px);

    overflow-y: auto;

    background:
        linear-gradient(
            135deg,
            rgba(108, 99, 255, 0.12),
            transparent 42%
        ),
        rgba(20, 20, 31, 0.98);

    border: 1px solid var(--border) !important;
    border-radius: var(--radius-large);

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    transform: translate(-50%, -50%);
}

#videoModal > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

video {
    width: 100%;
    min-height: 220px;

    display: block;

    object-fit: cover;

    background: #050507;

    border: 1px solid rgba(108, 99, 255, 0.24);
    border-radius: var(--radius-medium);

    box-shadow:
        0 16px 36px rgba(0, 0, 0, 0.36),
        0 0 0 4px rgba(108, 99, 255, 0.04);
}

#videoModal > button {
    margin-top: 8px;
    margin-right: 7px;
}

#hangupBtn {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        var(--danger),
        var(--accent-secondary)
    );

    border-color: rgba(255, 101, 132, 0.4);

    box-shadow: 0 10px 24px rgba(255, 83, 111, 0.2);
}

#hangupBtn:hover {
    box-shadow: 0 14px 30px rgba(255, 83, 111, 0.3);
}

#muteBtn,
#cameraBtn {
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.055);

    border-color: rgba(255, 255, 255, 0.1);

    box-shadow: none;
}

#muteBtn:hover,
#cameraBtn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);

    border-color: rgba(108, 99, 255, 0.28);
}

@media (max-width: 800px) {
    body {
        padding: 18px;
    }

    #mentorSection,
    #menteeSection {
        padding: 22px 18px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    #videoModal {
        width: calc(100% - 32px);
    }

    .site-header {
        padding: 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .topbar-nav {
        width: 100%;
        gap: 20px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .nav-link {
        width: auto;
        flex-shrink: 0;
    }
}

@media (max-width: 600px) {
    body {
        padding: 16px;
    }

    #userInfo {
        padding: 18px;
    }

    #userInfo p {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    #mentorSection,
    #menteeSection {
        padding: 20px 16px;

        border-radius: 18px;
    }

    #videoModal {
        padding: 20px !important;
    }

    #videoModal > div {
        grid-template-columns: 1fr;
    }

    video {
        min-height: 190px;
    }

    #videoModal > button {
        width: 100%;
        margin-right: 0;
    }

    button {
        width: 100%;
    }
}

/* ========================================
   MENTOR PROFILE — NEW FIELDS
======================================== */

#mentorProfileForm {
    margin-bottom: 24px;
    padding: 22px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;

    background: rgba(10, 10, 15, 0.28);

    border: 1px solid var(--border-light);
    border-radius: var(--radius-medium);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

#mentorProfileForm > div {
    margin: 0;
}

#mentorProfileForm > br {
    display: none;
}

/* Professional bio takes the full row */
#mentorProfileForm > div:nth-of-type(5) {
    grid-column: 1 / -1;
}

textarea {
    width: 100%;
    min-height: 130px;
    padding: 12px 13px;

    display: block;
    resize: vertical;
    outline: none;

    color: var(--text);
    background: rgba(255, 255, 255, 0.035);

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 11px;

    font-family: "DM Sans", sans-serif;
    font-size: 0.88rem;
    line-height: 1.6;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

textarea:hover {
    border-color: rgba(108, 99, 255, 0.28);
}

textarea:focus {
    background: rgba(108, 99, 255, 0.06);
    border-color: var(--accent);

    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}

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

#saveMentorProfileBtn {
    width: fit-content;
    grid-column: 1 / -1;
    margin-top: 2px;
}

/* ========================================
   RESUME UPLOAD
======================================== */

#resumeFile {
    padding: 7px;
    cursor: pointer;
}

#resumeFile::file-selector-button {
    min-height: 34px;
    margin-right: 12px;
    padding: 7px 13px;

    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #38bdf8);

    border: 1px solid #2563eb;
    border-radius: 8px;

    font-family: "DM Sans", sans-serif;
    font-size: 0.8rem;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

#resumeFile::file-selector-button:hover {
    background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
    border-color: var(--accent);
}

/* ========================================
   NEW FIELDS — RESPONSIVE
======================================== */

@media (max-width: 700px) {
    #mentorProfileForm {
        padding: 18px;
        grid-template-columns: 1fr;
    }

    #mentorProfileForm > div:nth-of-type(5),
    #saveMentorProfileBtn {
        grid-column: 1;
    }

    #saveMentorProfileBtn {
        width: 100%;
    }
}

#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 250px;
    margin-bottom: 10px;
    padding: 14px 18px;
    color: white;
    background: #333;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    animation: toastSlideIn 0.3s ease;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

.domain-multiselect {
    position: relative;
    width: 100%;
}

#domainDropdownButton {
    width: 100%;
    min-height: 48px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: inherit;
    background: inherit;
    border: 1px solid #353548;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
}

.selected-domains-display {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.domain-placeholder {
    color: #b8b8c8;
}

.selected-domain-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(132, 94, 247, 0.22);
    border: 1px solid #7c5cff;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.2;
}

.remove-domain-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.remove-domain-tag:hover {
    background: rgba(255, 255, 255, 0.2);
}

.domain-dropdown-arrow {
    flex-shrink: 0;
}

.domain-checkbox-list {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    padding: 8px;
    background: #151520;
    border: 1px solid #45455f;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.domain-checkbox-list.show {
    display: block;
}

.domain-checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.domain-checkbox-option:hover {
    background: #242437;
}

.domain-checkbox-option input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}


/* =========================================
   BOOKING PAGE — LIGHT THEME FIX
   ========================================= */

/* Main mentor and mentee cards */
#mentorSection,
#menteeSection {
    background: #ffffff !important;
    color: #142d4e !important;
    border: 1px solid #dbeaf2 !important;
    box-shadow: 0 8px 28px rgba(35, 85, 135, 0.08) !important;
}

/* Headings */
#mentorSection h2,
#mentorSection h3,
#menteeSection h2,
#menteeSection h3 {
    color: #142d4e !important;
}

/* Labels and general text */
#mentorSection label,
#menteeSection label {
    color: #334e68 !important;
}

#mentorSection p,
#menteeSection p {
    color: #526780 !important;
}

/* Mentor profile form */
#mentorProfileForm {
    background: #f8fbff !important;
    border: 1px solid #dbeaf2 !important;
    box-shadow: none !important;
}

/* Input fields and dropdowns */
#mentorSection input,
#mentorSection select,
#mentorSection textarea,
#menteeSection input,
#menteeSection select,
#menteeSection textarea {
    background: #ffffff !important;
    color: #142d4e !important;
    border: 1px solid #cbddec !important;
}

/* Placeholder text */
#mentorSection input::placeholder,
#mentorSection textarea::placeholder,
#menteeSection input::placeholder {
    color: #64748b !important;
}

/* Date and time picker icons */
input[type="date"],
input[type="time"] {
    color-scheme: light !important;
}

/* Tables */
#mentorSection table,
#menteeSection table {
    background: #ffffff !important;
    color: #142d4e !important;
    border: 1px solid #dbeaf2 !important;
}

#mentorSection thead,
#menteeSection thead {
    background: #eaf2ff !important;
}

#mentorSection th,
#menteeSection th {
    color: #142d4e !important;
}

#mentorSection td,
#menteeSection td {
    color: #334e68 !important;
    border-bottom: 1px solid #dbeaf2 !important;
}

#mentorSection tbody tr,
#menteeSection tbody tr {
    background: #ffffff !important;
}

#mentorSection tbody tr:hover,
#menteeSection tbody tr:hover {
    background: #f0f7ff !important;
}

/* Domain selection dropdown */
#domainDropdownButton {
    background: #ffffff !important;
    color: #142d4e !important;
    border: 1px solid #cbddec !important;
}

.domain-placeholder {
    color: #64748b !important;
}

.domain-checkbox-list {
    background: #ffffff !important;
    border: 1px solid #dbeaf2 !important;
    box-shadow: 0 12px 30px rgba(35, 85, 135, 0.12) !important;
}

.domain-checkbox-option {
    color: #142d4e !important;
}

.domain-checkbox-option:hover {
    background: #eaf2ff !important;
}

.selected-domain-tag {
    background: #eaf2ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}

.remove-domain-tag {
    color: #1d4ed8 !important;
}

/* Buttons */
#mentorSection button:not(#domainDropdownButton),
#menteeSection button {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #ffffff;
    border: 1px solid #2563eb;
}

/* Destructive action buttons */
#availabilityTable button,
#bookingsTable td:last-child button {
    background: #fff1f2 !important;
    color: #be123c !important;
    border: 1px solid #fecdd3 !important;
}


/* ========================================
   CREATE CONFERENCE FORM
======================================== */

#conferenceCreationForm {
    margin-bottom: 24px;
    padding: 22px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;

    background: #f8fbff;
    border: 1px solid #dbeaf2;
    border-radius: var(--radius-medium);
}

#conferenceCreationForm > div {
    min-width: 0;
}

#conferenceCreationForm > br {
    display: none;
}

#conferenceCreationForm p {
    grid-column: 1 / -1;
    margin: 0;
    color: #526780;
    font-size: 0.85rem;
}

#createConferenceBtn {
    grid-column: 1 / -1;
    width: fit-content;
    margin-top: 4px;
}

@media (max-width: 700px) {
    #conferenceCreationForm {
        padding: 18px;
        grid-template-columns: 1fr;
    }

    #createConferenceBtn {
        width: 100%;
    }
}