/* 
   Hana Financial Group - Premium Web Design 
   Theme: Premium Financial (Hana Green, Charcoal, White)
*/

@font-face {
    font-family: 'Hana2.0';
    src: url('/event-static/assets/fonts/Hana2-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Hana2.0';
    src: url('/event-static/assets/fonts/Hana2-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Hana2.0';
    src: url('/event-static/assets/fonts/Hana2-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}



:root {
    --primary-color: #009178;
    /* Hana Green */
    --primary-dark: #006061;
    --secondary-color: #333333;
    /* Dark Charcoal */
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #F5F7FA;
    /* Light Gray Background */
    --surface-color: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --radius-sm: 8px;
    --radius-md: 16px;
    --transition: all 0.3s ease;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-hana: 'Hana2.0', var(--font-main);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5em;
}

p {
    color: var(--text-light);
    margin-bottom: 1em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =========================================
   Auth Page (Index) 
   ========================================= */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-content {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Reduced top padding to move content up */
    padding: 80px 20px 40px;
    background: url('/event-static/assets/BG.png') no-repeat center center;
    background-size: cover;
}

/* Footer Logo */
.footer-logo {
    /* Filter removed to show original logo color on white background */
}

.auth-card {
    background: var(--surface-color);
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    padding: 40px;
    text-align: center;
}

/* Logo in Auth Card */
.auth-logo {
    height: 32px;
    width: auto;
    margin-bottom: 30px;
}

/* Tabs */
.auth-tabs {
    display: flex;
    background: #F0F2F5;
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--surface-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Forms */
.auth-form-container {
    display: none;
    animation: fadeIn 0.4s ease;
}

.auth-form-container.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
    background: #FAFAFA;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--surface-color);
    box-shadow: 0 0 0 3px rgba(0, 132, 133, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.form-footer {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-light);
}

.form-footer a {
    font-weight: 600;
}

/* =========================================
   Dashboard Page 
   ========================================= */
.dashboard-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dashboard-header {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    height: 32px;
    width: auto;
}

.sign-out-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
}

.sign-out-link:hover {
    color: var(--secondary-color);
}

.dashboard-main {
    flex: 1;
    padding: 40px 0;
}

.welcome-section {
    margin-bottom: 40px;
}

.welcome-title {
    font-size: 28px;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 16px;
    color: var(--text-light);
}

/* Grid Layout */
/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 2fr 1fr;
        /* Left content 2fr, Right sidebar 1fr */
        /* align-items: start; Removed to allow stretching */
    }
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-sidebar {
    /* position: sticky; Removed sticky to allow full height match */
    /* top: 20px; */
    height: 100%;
}

.dashboard-sidebar .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-sm);
    border-color: #D0D0D0;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F0F0F0;
}

.card-icon {
    width: 36px;
    height: 36px;
    background: rgba(0, 132, 133, 0.1);
    color: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

/* Info List */
.info-list {
    list-style: none;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.info-label {
    color: var(--text-light);
    font-weight: 500;
}

.info-value {
    color: var(--secondary-color);
    font-weight: 600;
    text-align: right;
}

.status-badge {
    background: #E6F4F1;
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* Webinar Card */
.webinar-time {
    font-size: 15px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.webinar-desc {
    font-size: 14px;
    margin-bottom: 20px;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline i {
    margin-right: 8px;
}

/* Network Grid */
.network-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
}

.network-item {
    background: #FAFAFA;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100px;
}

.network-item:hover {
    border-color: var(--primary-color);
    background: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.flag-code {
    font-size: 18px;
    font-weight: 800;
    color: #CCD0D5;
    margin-bottom: 8px;
}

.country-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 10.5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    background: white;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-text {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
}

.footer-logo {
    height: 0.752em;
    width: auto;
    vertical-align: middle;
    margin-top: -2px;
}

.footer-link {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Success Overlay */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.success-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    max-width: 320px;
    width: 100%;
    border: 1px solid var(--border-color);
}

.success-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.success-title {
    font-size: 20px;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .network-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .main-footer {
        padding: 10.5px 0;
    }

    .login-event-title-kr {
        font-size: 36px;
    }

    .login-event-title-en {
        font-size: 24px;
    }

    .login-event-date {
        font-size: 14px;
    }

    .event-title-ko {
        font-size: clamp(22px, 6vw, 36px);
    }

    .event-title-en {
        font-size: clamp(16px, 4.5vw, 24px);
    }
}

/* Speaker Profiles (Modern) */
.speaker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns for 6 speakers (3+3 layout) */
    gap: 20px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .speaker-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on mobile */
    }
}

@media (max-width: 480px) {
    .speaker-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on small mobile */
        gap: 16px;
    }
}

.speaker-card {
    background: transparent;
    border: none;
    padding: 0;
    text-align: center;
    /* Centered for smaller photos */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.speaker-photo {
    width: 80px;
    /* Smaller fixed width */
    height: 80px;
    border-radius: 20px;
    /* Rounded square */
    object-fit: cover;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.speaker-info {
    padding: 0;
}

.speaker-name-ko {
    font-size: 15px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 2px;
}

.speaker-name-en {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
    font-weight: 500;
}

.speaker-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-color);
    display: inline-block;
    background: #E6F4F1;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Download Buttons */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #F5F7FA;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.btn-download:hover {
    background: var(--border-color);
    color: var(--primary-color);
}

/* Event Titles */
.event-title-ko {
    font-family: 'Hana2.0', sans-serif;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: clamp(24px, 5vw, 48px);
    font-weight: 700;
    line-height: 1.3;
    word-break: keep-all;
}

.event-title-en {
    font-family: 'Hana2.0', sans-serif;
    color: var(--primary-color);
    margin-bottom: 24px;
    font-size: clamp(18px, 3.5vw, 32px);
    font-weight: 700;
    line-height: 1.3;
    word-break: keep-all;
}

/* Footer Logo - Filter removed */

/* Login Page Event Header */
.auth-header-info {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    z-index: 10;
}

.login-event-title-kr {
    font-family: 'Hana2.0', sans-serif;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.1;
    color: #ffffff;
}

.login-event-title-en {
    font-family: 'Hana2.0', sans-serif;
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 24px;
    line-height: 1.1;
    opacity: 1;
    color: #ffffff;
}

.login-event-date {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.5;
    color: #ffffff;
}

/* =========================================
   Language Switch 
   ========================================= */
.lang-switch {
    display: flex;
    gap: 8px;
}

.lang-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.lang-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lang-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* =========================================
   Replay Page
   ========================================= */
.replay-header {
    text-align: left;
    margin-bottom: 24px;
    /* Reduced margin for tighter look */
}

.replay-title-ko {
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 700;
    color: #009178;
    margin-bottom: 8px;
    line-height: 1.2;
    word-break: keep-all;
}

.replay-title-en {
    font-size: clamp(18px, 3.5vw, 32px);
    font-weight: 700;
    color: #009178;
    margin-bottom: 8px;
    line-height: 1.2;
    word-break: keep-all;
}

.replay-date-time {
    font-size: 16px;
    color: #666666;
    line-height: 1.6;
}

.replay-date {
    font-size: 16px;
    color: var(--text-light);
}

.replay-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* 
    Video Card Specifics 
    - Remove padding from card to let video go edge-to-edge
    - Add padding back to header content
*/
.replay-video-card {
    padding: 0 !important;
    /* Force override generic .card padding */
    overflow: hidden;
    /* Ensure rounded corners clip the video */
    background: transparent;
    /* Seamless look */
    border: none;
    box-shadow: none;
}

.replay-video-card .replay-header {
    background: white;
    padding: 30px 30px 20px 30px;
    /* Restore padding for text */
    margin-bottom: 0;
    /* Remove existing bottom margin */
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    /* Top rounded only */
    border: 1px solid var(--border-color);
    border-bottom: none;
    /* Connect to video container */
}

.replay-video-card .video-player-container {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    /* Bottom rounded only */
    border: 1px solid var(--border-color);
    border-top: none;
    /* Connect to header */
}

@media (min-width: 1024px) {
    .replay-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.video-container,
.video-player-container {
    position: relative;
    width: 100%;
    /* padding-bottom: 56.25%; Remove this if handled inline, but keeping acts as fallback */
    background: #000;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.video-container iframe,
.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    background: #F5F7FA;
}

.video-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.materials-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.materials-list .btn-download {
    width: 100%;
    justify-content: center;
}