:root {
    /* Color Palette - Premium Corporate & Medical */
    --bg-base: #030712;
    --bg-surface: rgba(17, 24, 39, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);
    
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #0ea5e9;
    --accent: #2dd4bf;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    --success: #10b981;
    
    /* Variables for transitions */
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 600;
}

.text-gradient {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

ul {
    list-style: none;
}
a {
    text-decoration: none;
    color: inherit;
}

/* Utilities */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}
.section-padding {
    padding: 6rem 0;
}
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.opacity-60 { opacity: 0.6; }
.opacity-80 { opacity: 0.8; }
.font-bold { font-weight: 700; }
.text-green { color: var(--success); }
.hidden { display: none !important; }

/* 21st.dev inspired Background Animated Orbs */
.bg-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}
.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}
.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
    animation-duration: 25s;
}
.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
    opacity: 0.2;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

/* Glassmorphism Classes (Atlassian / Modern UI focus) */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(3, 7, 18, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    transition: transform 0.3s ease, background 0.3s ease;
}

.glass-nav.scrolled {
    background: rgba(3, 7, 18, 0.75);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Premium Hover Cards (Tracing glow / scale effect) */
.premium-hover {
    transition: transform var(--transition-bounce), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}
.premium-hover::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06), transparent 40%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.premium-hover:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.1);
}
.premium-hover:hover::before {
    opacity: 1;
}
.premium-hover > * {
    position: relative;
    z-index: 2;
}


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    border-radius: 999px;
    transition: all var(--transition-bounce);
    cursor: pointer;
    border: none;
    outline: none;
}
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.875rem; }
.btn-md { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.125rem; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}
.btn-primary:hover::after {
    left: 100%;
}
.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
    transform: scale(1.02);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.4);
}

/* Magnetic Utility (Handled by JS, CSS just ensures will-change and transition) */
.magnetic {
    will-change: transform;
    /* Transformation actually applied by JS */
}

/* Section Components */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.title-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 0 auto;
    border-radius: 4px;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 5rem;
}
.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.6;
    z-index: -1;
    mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
    overflow: hidden;
}
.hero-bg canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    outline: none;
}
.hero-content {
    text-align: center;
    max-width: 1000px;
    padding: 0 2rem;
}
.badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--secondary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.hero-title {
    font-size: clamp(2.5rem, 4.5vw, 4.2rem);
    line-height: 1.3;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    word-break: keep-all;
    overflow-wrap: break-word;
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}
.hero-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    text-align: left;
    min-width: 200px;
}
.meta-item i {
    font-size: 2rem;
    color: var(--secondary);
}
.meta-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.meta-value {
    font-weight: 600;
    font-size: 1rem;
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* About Card Icon */
.card-icon {
    width: 56px; height: 56px;
    border-radius: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem; color: var(--secondary);
    margin-bottom: 1.5rem;
}

/* Speaker */
.speaker-card {
    display: flex;
    gap: 3rem;
    align-items: center;
    padding: 3rem;
}
@media (max-width: 768px) {
    .speaker-card { flex-direction: column; text-align: center; padding: 2rem 1rem; }
}
.speaker-image {
    flex-shrink: 0;
}
.speaker-photo {
    width: 200px; height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(56, 189, 248, 0.5);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 0 20px rgba(56, 189, 248, 0.2);
}
.speaker-badge { margin-bottom: 1rem; }
.speaker-name { font-size: 2.25rem; font-weight: 700; margin-bottom: 0.25rem; }
.speaker-name-jp { font-size: 1.25rem; font-weight: 400; color: var(--text-secondary); margin-left: 0.5rem; }
.speaker-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 1.5rem; }
.speaker-bio { color: var(--text-secondary); line-height: 1.8; }

/* Timeline (Schedule) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 0; left: 16px; width: 2px; height: 100%;
    background: linear-gradient(to bottom, rgba(59,130,246,0.5), transparent);
}
.timeline-item {
    position: relative;
    padding-left: 4rem;
    margin-bottom: 3rem;
}
.timeline-dot {
    position: absolute;
    top: 24px; left: 10px; width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 2px solid var(--primary);
    box-shadow: 0 0 10px rgba(59,130,246,0.5);
    z-index: 2;
    transition: all 0.3s ease;
}
.timeline-dot.active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent);
}
.timeline-time {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}
.timeline-content {
    padding: 1.5rem;
}
.timeline-content h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.timeline-content p { color: var(--text-secondary); font-size: 0.95rem; }
.active-card {
    border-color: rgba(45, 212, 191, 0.3) !important;
    background: linear-gradient(to right, rgba(17, 24, 39, 0.8), rgba(45, 212, 191, 0.05));
}

/* Access Map */
.access-container {
    display: flex;
    padding: 0;
}
.access-info {
    padding: 3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.access-info h3 { font-size: 1.75rem; margin-bottom: 1rem; }
.access-info p { color: var(--text-secondary); display: flex; align-items: center; gap: 0.5rem; }
.map-placeholder {
    flex: 1;
    min-height: 400px;
    background: rgba(0,0,0,0.3);
    border-left: 1px solid var(--border-glass);
    position: relative;
}
.map-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    text-align: center; color: rgba(255,255,255,0.5); font-size: 0.875rem;
    pointer-events: none; /* Let clicks pass to map */
}
@media (max-width: 768px) {
    .access-container { flex-direction: column; }
    .map-placeholder { border-left: none; border-top: 1px solid var(--border-glass); min-height: 300px; }
}

/* Registration Section */
.registration-wrapper {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 3rem;
    padding: 3rem;
    align-items: center;
}
@media (max-width: 900px) {
    .registration-wrapper { grid-template-columns: 1fr; }
}
.steps .step { display: flex; gap: 1rem; }
.step-num {
    width: 32px; height: 32px; flex-shrink: 0;
    border-radius: 50%; background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3);
    color: var(--secondary); display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.reg-right {
    background: rgba(17, 24, 39, 0.8);
    border-color: rgba(255,255,255,0.1);
}
.input-group {
    display: flex; flex-direction: column; gap: 0.5rem; text-align: left;
}
.input-group label { font-size: 0.875rem; color: var(--text-secondary); }
.input-group input {
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
    color: white; padding: 0.875rem 1rem; border-radius: 0.5rem;
    font-size: 1rem; outline: none; transition: border-color 0.3s, box-shadow 0.3s;
}
.input-group input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}
.qrcode-container {
    display: inline-block;
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}
.qrcode-container img { display: block; margin: 0 auto; }

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--delay, 0) * 0.1s);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Mobile Optimization (Comprehensive Fix for Overflowing Content)
   ========================================================================== */
@media (max-width: 768px) {
    body, html {
        overflow-x: hidden;
        width: 100%;
    }
    p, span, h1, h2, h3, h4 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .container {
        padding: 0 1.25rem;
    }
    .section-padding {
        padding: 4rem 0;
    }
    .hero {
        padding-top: 6rem;
    }
    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        word-break: normal; /* Override keep-all which causes cutoff */
        margin-bottom: 1rem;
    }
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    .meta-item {
        padding: 1rem;
        min-width: 100%;
    }
    /* Reduce large paddings that push content outside the screen */
    .glass-card {
        padding: 1.5rem !important;
    }
    .speaker-card {
        padding: 2rem 1rem !important;
    }
    .speaker-photo {
        width: 160px; height: 160px;
    }
    /* Timeline Mobile Fixes */
    .timeline::before {
        left: 6px;
    }
    .timeline-dot {
        left: 1px;
        top: 24px;
        width: 12px; height: 12px;
    }
    .timeline-item {
        padding-left: 2rem;
        margin-bottom: 2rem;
    }
    .timeline-time {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    .timeline-content {
        padding: 1.25rem !important;
    }
    /* Access & Maps */
    .access-info {
        padding: 2rem 1.5rem !important;
    }
    /* Registration */
    .registration-wrapper {
        padding: 2rem 1.5rem !important;
        grid-template-columns: 1fr;
    }
    .steps {
        padding: 1.5rem !important;
    }
    .step-text {
        width: calc(100% - 48px) !important;
    }
}
