/* Cài đặt cơ bản */
:root {
    --primary-color: #ffcc00; /* Vàng đặc trưng Vdrone */
    --dark-bg: #1a1a1a;
    --light-bg: #f4f6f9;
    --text-color: #111;
    --text-muted: #444;
    --panel-bg: rgba(255, 255, 255, 0.85);
    --transition-speed: 0.8s;
}

body.dark-mode {
    --light-bg: #111;
    --text-color: #f4f6f9;
    --text-muted: #bbb;
    --panel-bg: rgba(26, 26, 26, 0.9);
}

body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background-color: var(--light-bg);
    color: var(--text-color);
    scroll-behavior: smooth;
    transition: background-color var(--transition-speed);
}

/* Lớp phủ hiệu ứng chuyển cảnh Dark Mode */
#theme-transition-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 2vmax;
    height: 2vmax;
    background: var(--dark-bg);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: -2;
    pointer-events: none;
    transition: transform 1.5s cubic-bezier(0.65, 0, 0.35, 1);
    filter: blur(1px); /* Làm mềm cạnh vòng tròn */
}

body.dark-mode #theme-transition-overlay {
    transform: translate(-50%, -50%) scale(150);
}

/* 1. THANH ĐIỀU HƯỚNG (NAVBAR) */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px;
    max-width: 1400px;
    margin: 0 auto;
}
.logo {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 2px;
    flex-shrink: 0;
}
.logo span { color: white; }

.nav-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
}
.nav-links li a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.3s;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.nav-icon {
    display: none; /* Ẩn icon trên desktop */
}
.nav-links li a:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

#navThemeToggle, #menuToggle {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s, color 0.3s;
}

#navThemeToggle i, #menuToggle i {
    font-size: 20px;
    color: white;
    line-height: 1;
    display: block;
}

#navThemeToggle:hover, #menuToggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.mobile-only {
    display: none !important;
}

/* 2. CÁC SECTION CỦA TRANG */
section {
    min-height: 100vh;
    padding: 80px 20px 20px; /* Chừa chỗ cho navbar cố định */
    box-sizing: border-box;
}

/* Phần Trang chủ chứa 3D Drone */
#trang-chu {
    position: relative;
    padding: 0; 
    background-color: transparent; /* Để lộ lớp phủ phía sau */
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Bảng điều khiển Drone */
#ui-panel {
    position: absolute;
    bottom: auto;
    top: 45%;
    right: 5%;
    transform: translateY(-50%);
    background: var(--panel-bg);
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    width: 320px;
    z-index: 100;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideLeft 1s cubic-bezier(0.25, 1, 0.5, 1) 1.2s both;
}

@keyframes slideLeft {
    from {
        transform: translate(100px, -50%);
        opacity: 0;
    }
    to {
        transform: translate(0, -50%);
        opacity: 1;
    }
}
#ui-panel h3 { margin: 0 0 15px 0; color: var(--text-color); }
#ui-panel button { 
    background: var(--primary-color); 
    color: #000; border: none; padding: 12px 20px; font-size: 16px;
    font-weight: bold; border-radius: 6px; cursor: pointer; width: 100%; transition: 0.3s;
}
#ui-panel button:hover { background: #e6b800; }
.control-group { margin-top: 15px; text-align: left; }
.control-group label { font-size: 14px; font-weight: 600; color: var(--text-muted); display: block; margin-bottom: 8px;}

/* Nút chuyển đổi Theme */
#themeToggle {
    margin-top: 15px;
    background: #444;
    color: #fff;
}
body.dark-mode #themeToggle {
    background: var(--primary-color);
    color: #000;
}
input[type=range] { width: 100%; cursor: pointer; }

/* Tiêu đề giới thiệu nổi trên 3D */
.hero-text {
    position: absolute;
    top: 45%;
    left: 5%;
    transform: translateY(-50%);
    z-index: 100;
    width: 35%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: none;
}
.hero-text h1 {
    font-size: 3.2rem;
    color: var(--text-color);
    margin: 0 0 15px 0;
    text-shadow: 0 2px 15px rgba(255,255,255,0.2);
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.hero-text h1 span {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    filter: blur(10px);
    animation: wordSlideUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.hero-text h1 span:nth-child(1) { animation-delay: 0.1s; }
.hero-text h1 span:nth-child(2) { animation-delay: 0.2s; }
.hero-text h1 span:nth-child(3) { animation-delay: 0.35s; }
.hero-text h1 span:nth-child(4) { animation-delay: 0.5s; }

.hero-text p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 100%;
    text-align: left;
    margin: 0;
    line-height: 1.6;
    animation: fadeInUp 1s ease 1s both;
}

/* Hoạt ảnh cho Hero Text */
@keyframes wordSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Nội dung các phần khác */
.content-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--light-bg);
    text-align: center;
    transition: background-color var(--transition-speed);
}
.content-section:nth-child(even) { background-color: var(--light-bg); opacity: 0.95; }
.content-section h2 { font-size: 2.5rem; color: var(--text-color); margin-bottom: 20px; }
.content-section p { max-width: 800px; font-size: 1.1rem; line-height: 1.6; color: var(--text-muted); }

/* Báo lỗi 3D */
#error-msg { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff3cd; padding: 20px; border-radius: 8px; font-weight: bold; z-index: 100; }

/* 3. PHẦN ĐẶT LỊCH (BOOKING SECTION) — PREMIUM REDESIGN */
#dat-lich {
    position: relative;
    padding: 100px 40px;
    background: #0e0e0e;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 100vh;
}

/* Animated background glow orb */
.booking-bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,204,0,0.12) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.booking-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ---- LEFT: Info Panel ---- */
.booking-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
}

.booking-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--primary-color);
    background: rgba(255,204,0,0.1);
    border: 1px solid rgba(255,204,0,0.25);
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 28px;
    width: fit-content;
}

.booking-headline {
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.1;
    color: #fff;
    margin: 0 0 20px 0;
    letter-spacing: -1px;
}

.booking-headline span {
    color: var(--primary-color);
    display: block;
}

.booking-desc {
    font-size: 1rem;
    color: #888;
    line-height: 1.7;
    margin-bottom: 40px;
}

.booking-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.72rem;
    color: #666;
    text-align: center;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.08);
}

.booking-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #aaa;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.feature-tag i {
    color: var(--primary-color);
    width: 16px;
}

/* ---- RIGHT: Form Panel ---- */
.booking-form-panel {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;
    padding: 44px;
    backdrop-filter: blur(20px);
    box-shadow: 0 40px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
}

.form-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.form-step-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: #555;
    text-transform: uppercase;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Role toggle */
.role-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.role-toggle-label {
    font-size: 0.85rem;
    color: #777;
    white-space: nowrap;
}

.role-toggle {
    display: flex;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    overflow: hidden;
    flex: 1;
}

.role-toggle input[type="radio"] {
    display: none;
}

.role-toggle label {
    flex: 1;
    padding: 10px 16px;
    text-align: center;
    cursor: pointer;
    font-size: 0.88rem;
    color: #666;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.role-toggle input[type="radio"]:checked + label {
    background: var(--primary-color);
    color: #000;
    font-weight: 700;
}

/* Form fields */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #777;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-field label i {
    color: var(--primary-color);
    font-size: 0.75rem;
}

.form-field input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 13px 16px;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

.form-field input::placeholder {
    color: #444;
}

.form-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255,204,0,0.04);
    box-shadow: 0 0 0 3px rgba(255,204,0,0.1);
}

/* Custom select */
.select-wrap {
    position: relative;
}

.select-wrap select {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 13px 40px 13px 16px;
    color: #fff;
    font-size: 0.95rem;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.3s;
    font-family: inherit;
}

.select-wrap select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255,204,0,0.1);
}

.select-wrap select option {
    background: #1a1a1a;
    color: #fff;
}

.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    font-size: 0.75rem;
    pointer-events: none;
}

/* Weight slider */
.weight-field label strong {
    color: var(--primary-color);
    font-size: 0.95rem;
}

.weight-field {
    overflow: hidden;
}

.weight-slider-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    overflow: hidden;
}

.weight-slider-wrap input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 99px;
    cursor: pointer;
    position: relative;
    display: block;
}

.weight-slider-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255,204,0,0.5);
    transition: transform 0.2s;
}

.weight-slider-wrap input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.weight-track-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #555;
}

/* Submit button */
.launch-btn {
    margin-top: 10px;
    position: relative;
    border: none;
    border-radius: 14px;
    background: var(--primary-color);
    color: #000;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    letter-spacing: 0.5px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.launch-btn-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 17px 24px;
    position: relative;
    z-index: 1;
}

.launch-btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.launch-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255,204,0,0.45);
}

.launch-btn:hover .launch-btn-glow {
    opacity: 1;
}

.launch-btn:active {
    transform: translateY(0);
}

/* Light mode overrides for booking section */
body:not(.dark-mode) #dat-lich {
    background: #111;
}