:root {
    /* iSTEM-Ed 2026 Theme Colors */
    --primary-navy: #0a1628;
    --primary-blue: #1a237e;
    --secondary-blue: #3949ab;
    --accent-pink: #ff6fd8;
    --accent-magenta: #ec4899;
    --accent-orange: #ff6b35;
    --accent-orange-hover: #ff8c5a;
    --success-color: #10b981;
    --locked-color: #475569;
    --text-white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f0f4ff;
    --card-bg: #ffffff;
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.2);
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, var(--primary-navy) 0%, #0d1f42 50%, var(--primary-blue) 100%);
    background-attachment: fixed;
    color: var(--text-dark);
    line-height: 1.7;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Logo Banner */
.logo-banner {
    background: #ffffff;
    padding: 12px 0;
    text-align: center;
    border-bottom: 1px solid rgba(236, 72, 153, 0.2);
}

.logo-banner img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
}

/* Header */
.main-header {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-white);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 111, 216, 0.2);
}

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

.logo h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo span {
    font-size: 0.8rem;
    color: var(--accent-pink);
    letter-spacing: 2px;
    font-weight: 600;
}

.main-header nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 50px;
    background: rgba(255, 111, 216, 0.15);
    border: 1px solid rgba(255, 111, 216, 0.3);
    transition: all var(--transition);
}

.main-header nav a:hover {
    background: rgba(255, 111, 216, 0.3);
    border-color: var(--accent-pink);
}

/* Hero Section */
.hero-section {
    background:
        linear-gradient(135deg,
            rgba(26, 35, 126, 0.88) 0%,
            rgba(57, 73, 171, 0.85) 50%,
            rgba(156, 39, 176, 0.82) 100%),
        url('images/bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-white);
    padding: 70px 0 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Decorative elements */
.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.hero-section::before {
    width: 400px;
    height: 400px;
    background: var(--accent-pink);
    opacity: 0.25;
    top: -100px;
    right: -100px;
}

.hero-section::after {
    width: 300px;
    height: 300px;
    background: var(--secondary-blue);
    opacity: 0.4;
    bottom: -80px;
    left: -80px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.event-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-magenta));
    padding: 10px 28px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.4);
}

.hero-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, var(--accent-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 28px;
}

.event-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 1rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 40px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Timeline Section */
.timeline-section {
    padding: 70px 0;
    background: transparent;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 28px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--accent-pink), var(--secondary-blue), var(--locked-color));
    border-radius: 2px;
}

/* Timeline Item */
.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-magenta));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 25px rgba(236, 72, 153, 0.5);
}

.timeline-item.locked .timeline-marker {
    background: linear-gradient(135deg, #64748b, #475569);
    box-shadow: 0 4px 20px rgba(71, 85, 105, 0.3);
}

.phase-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.lock-icon {
    position: absolute;
    bottom: -8px;
    right: -8px;
    font-size: 1.2rem;
    background: white;
    padding: 4px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Timeline Content */
.timeline-content {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
}

.timeline-item.active .timeline-content {
    border: 2px solid var(--accent-pink);
    box-shadow: 0 10px 40px rgba(236, 72, 153, 0.2);
}

.timeline-item.locked .timeline-content {
    opacity: 0.75;
}

.phase-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 50%, #7c3aed 100%);
    padding: 20px 24px;
    color: white;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.timeline-item.locked .phase-header {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%);
}

.phase-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-right: auto;
}

.phase-date {
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
}

.phase-status {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
}

.status-open {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-magenta));
    color: white;
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.4);
}

.status-locked {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.status-closed {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
}

/* Closed timeline item styling */
.timeline-item.closed .timeline-marker {
    background: linear-gradient(135deg, #64748b, #475569);
}

.timeline-item.closed .timeline-content {
    opacity: 0.7;
}

.closed-message {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    text-align: center;
}

/* Phase Details */
.phase-details {
    padding: 24px;
    background: linear-gradient(180deg, #fafbff 0%, #fff 100%);
}

.phase-info {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.phase-info li {
    font-size: 0.95rem;
    color: var(--text-dark);
}

.phase-note {
    margin-top: 16px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid var(--accent-orange);
    border-radius: 8px;
    font-size: 0.9rem;
    color: #92400e;
}

/* Form Styles */
.phase-form {
    padding: 0 24px 28px;
    background: #fff;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.required {
    color: var(--accent-magenta);
}

.optional {
    color: var(--text-muted);
    font-weight: 400;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius-sm);
    font-family: 'Sarabun', sans-serif;
    font-size: 1rem;
    transition: all var(--transition);
    width: 100%;
}

.form-group input,
.form-group select {
    height: 48px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.15);
}

/* Unified Input Validation Styles */
.form-group input.input-valid,
.form-group select.input-valid,
.form-group textarea.input-valid {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

.form-group input.input-invalid,
.form-group select.input-invalid,
.form-group textarea.input-invalid {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

/* Unified Error Message Style */
.input-error {
    display: block;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    font-size: 0.85rem;
    color: #ef4444;
    margin-top: 6px;
    padding: 0;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left: 3px solid #ef4444;
    border-radius: 0 6px 6px 0;
    transition: all 0.3s ease;
}

.input-error.show {
    opacity: 1;
    max-height: 50px;
    padding: 8px 12px;
}

/* Hide old phone-error style, use new unified one */
.phone-error {
    display: none !important;
}

/* Members Section */
.members-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px dashed #e2e8f0;
}

.members-section h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 16px;
}

/* Register Button */
.btn-register {
    width: 100%;
    padding: 16px 32px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-orange) 0%, #ff8c5a 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Sarabun', sans-serif;
    cursor: pointer;
    transition: all var(--transition);
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-register::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-register:hover::before {
    left: 100%;
}

.btn-register:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.5);
}

.btn-icon {
    font-size: 1.3rem;
    transition: transform var(--transition);
}

.btn-register:hover .btn-icon {
    transform: translateX(4px);
}

/* Locked Overlay */
.locked-overlay {
    padding: 24px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-top: 1px dashed #cbd5e1;
    text-align: center;
}

.locked-message {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Benefits Section */
.benefits-section {
    padding: 70px 0;
    background: linear-gradient(135deg,
            rgba(26, 35, 126, 0.95) 0%,
            rgba(124, 58, 237, 0.9) 50%,
            rgba(236, 72, 153, 0.85) 100%);
    position: relative;
}

.benefits-section .section-title {
    color: white;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.benefit-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 32px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all var(--transition);
    color: white;
}

.benefit-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 111, 216, 0.5);
    box-shadow: 0 15px 40px rgba(236, 72, 153, 0.3);
}

.benefit-icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 14px;
}

.benefit-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.benefit-card p {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* Footer */
footer {
    background: var(--primary-navy);
    color: rgba(255, 255, 255, 0.85);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 111, 216, 0.2);
}

footer p {
    margin: 6px 0;
    font-size: 0.95rem;
}

footer strong {
    color: var(--accent-pink);
}

.footer-contact {
    margin-top: 16px;
    font-weight: 600;
}

.copyright {
    margin-top: 16px;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .main-header .container {
        flex-direction: column;
        gap: 12px;
    }

    .logo {
        text-align: center;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .hero-section {
        padding: 50px 0 60px;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .event-meta {
        flex-direction: column;
        gap: 12px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .timeline::before {
        left: 18px;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .timeline-marker {
        width: 40px;
        height: 40px;
    }

    .phase-number {
        font-size: 1.1rem;
    }

    .lock-icon {
        font-size: 0.9rem;
        bottom: -4px;
        right: -4px;
    }

    .phase-header {
        padding: 16px 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .phase-header h3 {
        font-size: 1.1rem;
    }

    .phase-info {
        grid-template-columns: 1fr;
    }

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

    .form-group.full-width {
        grid-column: span 1;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .benefit-card {
        padding: 24px 16px;
    }

    .benefit-icon {
        font-size: 2.2rem;
    }

    .hero-section::before,
    .hero-section::after {
        opacity: 0.15;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 40px 0 50px;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .timeline-section {
        padding: 50px 0;
    }

    .benefits-section {
        padding: 50px 0;
    }

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

    .phase-details {
        padding: 18px;
    }

    .phase-form {
        padding: 0 18px 24px;
    }
}

/* Advisor Section */
.advisor-section {
    border-top: 3px solid #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    padding: 20px;
    border-radius: var(--border-radius-sm);
    margin-top: 24px;
}

.advisor-section h4 {
    color: #059669;
}

/* Success Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(236, 72, 153, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

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

.modal-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 28px;
    text-align: center;
    color: white;
}

.modal-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 10px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.modal-header h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
}

.modal-body {
    padding: 24px;
}

.success-message {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.team-summary {
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    line-height: 1.8;
}

.team-summary strong {
    color: var(--primary-blue);
}

.qr-section {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 16px;
    border: 2px dashed #10b981;
}

.qr-section h4 {
    color: #059669;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.qr-instruction {
    color: #047857;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.qr-image {
    max-width: 280px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
    border: 4px solid white;
}

.modal-close-btn {
    display: block;
    width: calc(100% - 48px);
    margin: 0 24px 24px;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-orange) 0%, #ff8c5a 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Sarabun', sans-serif;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.35);
}

.modal-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.45);
}

/* Responsive modal */
@media (max-width: 480px) {
    .modal-content {
        max-height: 85vh;
        border-radius: 16px;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-icon {
        font-size: 2.8rem;
    }

    .modal-header h3 {
        font-size: 1.3rem;
    }

    .qr-image {
        max-width: 220px;
    }
}

/* Header Logo Icon */
.header-logo-link {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255, 111, 216, 0.1);
    border: 1px solid rgba(255, 111, 216, 0.3);
    transition: all var(--transition);
}

.header-logo-link:hover {
    background: rgba(255, 111, 216, 0.2);
    border-color: var(--accent-pink);
    transform: scale(1.05);
}

.header-logo-icon {
    height: 42px;
    width: auto;
    object-fit: contain;
}

/* Car Checkbox Group */
.car-checkbox-group {
    margin-top: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 10px;
    border: 2px solid #0ea5e9;
    transition: all var(--transition);
}

.checkbox-label:hover {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #0ea5e9;
    cursor: pointer;
}

.checkbox-text {
    font-size: 1rem;
    font-weight: 600;
    color: #0369a1;
}

/* Consent Section */
.consent-section {
    margin-top: 28px;
    padding: 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--border-radius);
    border: 2px solid #f59e0b;
}

.consent-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 16px;
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all var(--transition);
    border: 2px solid transparent;
}

.consent-checkbox:last-of-type {
    margin-bottom: 0;
}

.consent-checkbox:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #f59e0b;
}

.consent-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    min-width: 22px;
    margin-top: 2px;
    accent-color: #f59e0b;
    cursor: pointer;
}

.consent-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #78350f;
}

.consent-text strong {
    color: #b91c1c;
}

/* Phone Validation Error */
.phone-error {
    display: none;
    color: #dc2626;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 4px;
}

input[type="tel"]:invalid:not(:placeholder-shown)~.phone-error {
    display: block;
}

input[type="tel"]:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
    background: #fef2f2;
}

/* Field Hint */
.field-hint {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 4px 0 8px;
    line-height: 1.4;
}

/* Car Section */
.car-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 2px solid #0ea5e9;
}

.car-section h4 {
    color: #0369a1;
    margin: 0 0 16px;
    font-size: 1.1rem;
}

/* Attend Question */
.attend-question {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    border: 2px solid #f59e0b;
}

.attend-label {
    font-size: 1rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 12px;
}

.attend-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.attend-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all var(--transition);
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.attend-option:hover {
    border-color: #f59e0b;
    background: #fffbeb;
}

.attend-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #f59e0b;
    cursor: pointer;
}

.attend-option input[type="radio"]:checked+.attend-text {
    color: #b45309;
    font-weight: 700;
}

.attend-text {
    font-size: 1rem;
    color: var(--text-dark);
}

/* Fee Consent Animation */
#feeConsentGroup {
    animation: slideDown 0.3s ease;
    margin-top: 12px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.fee-consent {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    border: 2px solid #f59e0b !important;
}

/* Submit Button Disabled State */
.btn-register:disabled {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    cursor: not-allowed;
    box-shadow: 0 4px 15px rgba(156, 163, 175, 0.3);
    opacity: 0.7;
}

.btn-register:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(156, 163, 175, 0.3);
}

/* Floating Bubble Buttons */
.bubble-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.bubble-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border: none;
    border-radius: 50px;
    font-family: 'Sarabun', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.bubble-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.bubble-btn:hover::before {
    left: 100%;
}

.bubble-btn:hover {
    transform: translateX(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.bubble-btn-info {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.bubble-btn-info:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

.bubble-btn-timeline {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.bubble-btn-timeline:hover {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

.bubble-icon {
    font-size: 1.3rem;
}

.bubble-label {
    white-space: nowrap;
}

/* Info Modal Styles */
.info-modal-content {
    max-width: 520px;
}

.info-modal-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.info-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.info-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-section h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.info-section p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section ul li {
    font-size: 0.9rem;
    color: var(--text-dark);
    padding: 6px 0;
    padding-left: 8px;
    border-left: 3px solid var(--accent-pink);
    margin-bottom: 6px;
    background: rgba(236, 72, 153, 0.05);
    border-radius: 0 6px 6px 0;
}

.highlight-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 16px;
    border-radius: 12px;
    border: 2px solid #f59e0b;
    margin-bottom: 20px !important;
}

.highlight-box h4 {
    color: #92400e !important;
}

.highlight-box ul li {
    background: rgba(255, 255, 255, 0.8);
    border-left-color: #f59e0b;
}

/* Timeline Modal Styles */
.timeline-modal-content {
    max-width: 480px;
}

.timeline-modal-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

/* Fishbone Timeline */
.fishbone-timeline {
    position: relative;
    padding: 20px 0;
}

.fishbone-spine {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #8b5cf6, #6d28d9, #4c1d95);
    transform: translateX(-50%);
    border-radius: 2px;
}

.fishbone-item {
    position: relative;
    width: 50%;
    padding: 10px 0;
    display: flex;
    align-items: center;
}

.fishbone-item.left {
    padding-right: 30px;
    justify-content: flex-end;
}

.fishbone-item.right {
    margin-left: 50%;
    padding-left: 30px;
    justify-content: flex-start;
}

.fishbone-bone {
    position: absolute;
    top: 50%;
    width: 25px;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    transform: translateY(-50%);
}

.fishbone-item.left .fishbone-bone {
    right: 0;
}

.fishbone-item.right .fishbone-bone {
    left: 0;
}

.fishbone-content {
    background: white;
    padding: 14px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
    border: 2px solid #e9d5ff;
    transition: all 0.3s ease;
    max-width: 180px;
}

.fishbone-item:hover .fishbone-content {
    transform: scale(1.05);
    border-color: #8b5cf6;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.35);
}

.fishbone-item.final .fishbone-content {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.fishbone-item.final:hover .fishbone-content {
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
}

.fishbone-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: #8b5cf6;
    margin-bottom: 4px;
}

.fishbone-item.final .fishbone-date {
    color: #b45309;
}

.fishbone-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.fishbone-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Bubble Buttons Responsive */
@media (max-width: 768px) {
    .bubble-buttons {
        bottom: 20px;
        right: 16px;
    }

    .bubble-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }

    .bubble-icon {
        font-size: 1.1rem;
    }

    .header-logo-icon {
        height: 36px;
    }

    .fishbone-content {
        max-width: 140px;
        padding: 10px 12px;
    }

    .fishbone-title {
        font-size: 0.85rem;
    }

    .fishbone-desc {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .bubble-label {
        display: none;
    }

    .bubble-btn {
        padding: 14px;
        border-radius: 50%;
    }

    .fishbone-item.left,
    .fishbone-item.right {
        width: 100%;
        margin-left: 0;
        padding-left: 40px;
        padding-right: 10px;
        justify-content: flex-start;
    }

    .fishbone-spine {
        left: 15px;
    }

    .fishbone-bone {
        left: 17px !important;
        right: auto !important;
    }

    .fishbone-content {
        max-width: 100%;
    }

    .consent-checkbox {
        flex-direction: row;
        align-items: flex-start;
    }

    .consent-text {
        font-size: 0.85rem;
    }
}

/* ============================================ */
/* PDPA Consent Modal Styles */
/* ============================================ */

.main-content-hidden {
    display: none;
}

.main-content-visible {
    display: block;
}

/* Consent Modal Overlay */
.consent-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(26, 35, 126, 0.95) 0%,
            rgba(57, 73, 171, 0.92) 50%,
            rgba(255, 111, 216, 0.85) 100%);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.consent-modal-overlay.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.4s ease;
}

/* Consent Modal Content */
.consent-modal-content {
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 25px 80px rgba(26, 35, 126, 0.4),
        0 0 60px rgba(255, 111, 216, 0.2);
    animation: slideUp 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Consent Modal Header */
.consent-modal-header {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 50%, #7c3aed 100%);
    padding: 32px 24px;
    text-align: center;
    position: relative;
    border-radius: 24px 24px 0 0;
}

/* Logo Center */
.consent-logo-center {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.consent-logo-img {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* Consent Title */
.consent-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    margin: 0 0 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.pdpa-title {
    font-size: 1.4rem;
    background: linear-gradient(135deg, #fff 0%, #ffd1f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.consent-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin: 0;
}

/* Consent Modal Body */
.consent-modal-body {
    padding: 24px;
}

/* Info Highlight Box */
.info-highlight-box {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-left: 4px solid var(--secondary-blue);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.info-highlight-box h4 {
    color: var(--primary-blue);
    font-size: 1.1rem;
    margin: 0 0 8px;
}

.info-highlight-box p {
    color: var(--text-dark);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.8);
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(57, 73, 171, 0.1);
    transition: all var(--transition);
}

.info-item:hover {
    border-color: var(--accent-pink);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.15);
}

.info-icon {
    font-size: 1.6rem;
}

.info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-text strong {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.info-text span {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* Info Benefits */
.info-benefits {
    background: linear-gradient(135deg, #fdf4ff 0%, #fce7f3 100%);
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.info-benefits h4 {
    color: var(--accent-magenta);
    font-size: 1rem;
    margin: 0 0 12px;
}

.info-benefits ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.info-benefits li {
    font-size: 0.9rem;
    color: var(--text-dark);
}

/* Multi-phase Notice */
.multiphase-notice {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 16px 0;
    text-align: center;
}

.multiphase-notice .notice-text {
    font-size: 0.95rem;
    color: #1e40af;
    margin: 0;
    line-height: 1.5;
}

.multiphase-notice .notice-text strong {
    color: #1e3a8a;
}

/* Mini Timeline */
.mini-timeline {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.mini-timeline h4 {
    color: #0369a1;
    font-size: 1rem;
    margin: 0 0 12px;
}

.mini-timeline .timeline-steps {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mini-timeline .timeline-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(14, 165, 233, 0.2);
    font-size: 0.9rem;
    color: var(--text-dark);
}

.mini-timeline .timeline-steps li:last-child {
    border-bottom: none;
    padding-bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(236, 72, 153, 0.08));
    margin: 4px -20px 0;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
}

.mini-timeline .step-date {
    display: inline-block;
    min-width: 80px;
    font-weight: 700;
    color: #0ea5e9;
    font-size: 0.85rem;
}

.mini-timeline .timeline-steps li:last-child .step-date {
    color: var(--accent-magenta);
}

/* Consent Buttons */
.consent-btn-next {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 48px);
    margin: 24px auto;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--secondary-blue) 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Sarabun', sans-serif;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 8px 25px rgba(57, 73, 171, 0.4);
}

.consent-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(57, 73, 171, 0.5);
}

.consent-btn-next .btn-arrow {
    font-size: 1.3rem;
    transition: transform var(--transition);
}

.consent-btn-next:hover .btn-arrow {
    transform: translateX(4px);
}

/* PDPA Body */
.pdpa-body {
    padding: 28px;
}

/* PDPA Content */
.pdpa-content {
    margin-bottom: 24px;
}

.pdpa-intro {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.8;
    margin: 0 0 16px;
}

.pdpa-link {
    color: var(--secondary-blue);
    text-decoration: underline;
    font-weight: 600;
    transition: color var(--transition);
}

.pdpa-link:hover {
    color: var(--accent-magenta);
}

.pdpa-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
    padding: 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    border-left: 3px solid var(--text-muted);
}

/* PDPA Checkboxes */
.pdpa-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pdpa-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    padding: 18px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
    border-radius: 14px;
    border: 2px solid transparent;
    transition: all var(--transition);
}

.pdpa-checkbox-label:hover {
    border-color: rgba(57, 73, 171, 0.3);
    background: linear-gradient(135deg, #e8ecff 0%, #dde4ff 100%);
}

.pdpa-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.pdpa-checkbox-custom {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    margin-top: 2px;
}

.pdpa-checkbox:checked+.pdpa-checkbox-custom {
    background: linear-gradient(135deg, var(--secondary-blue) 0%, var(--accent-magenta) 100%);
    border-color: var(--secondary-blue);
}

.pdpa-checkbox:checked+.pdpa-checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.pdpa-checkbox-text {
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.6;
    flex: 1;
}

/* Accept Button */
.consent-btn-accept {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: calc(100% - 56px);
    margin: 0 auto 28px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Sarabun', sans-serif;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.consent-btn-accept:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.5);
}

.consent-btn-accept:disabled {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

.consent-btn-accept .btn-icon {
    font-size: 1.2rem;
}

/* Responsive Consent Modals */
@media (max-width: 640px) {
    .consent-modal-content {
        max-height: 95vh;
        margin: 10px;
        border-radius: 20px;
    }

    .consent-modal-header {
        padding: 24px 20px;
        border-radius: 20px 20px 0 0;
    }

    .consent-logo-img {
        width: 100px;
    }

    .consent-title {
        font-size: 1.3rem;
    }

    .pdpa-title {
        font-size: 1.15rem;
    }

    .consent-modal-body {
        padding: 20px;
    }

    .pdpa-body {
        padding: 20px;
    }

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

    .info-benefits ul {
        grid-template-columns: 1fr;
    }

    .pdpa-checkbox-label {
        padding: 14px;
    }

    .pdpa-checkbox-text {
        font-size: 0.85rem;
    }

    .consent-btn-next,
    .consent-btn-accept {
        width: calc(100% - 40px);
        font-size: 1rem;
    }
}

/* ============================================
 * Registration QR Code Section
 * ============================================ */
.registration-qr-section {
    background: linear-gradient(135deg, #eff6ff 0%, #fdf2f8 100%);
    border: 2px solid #e0e7ff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.registration-qr-section h4 {
    color: #3b82f6;
    font-size: 1.1rem;
    margin-bottom: 8px;
    text-align: center;
}

.qr-container {
    position: relative;
    display: inline-block;
    margin: 0 auto;
}

.qr-image {
    display: block;
    max-width: 180px;
    margin: 10px auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.qr-download-btn {
    position: absolute;
    top: 50%;
    right: -45px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    transform: translateY(-50%);
}

.qr-download-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.qr-download-btn:active {
    transform: scale(0.95);
}

.qr-section {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-top: 15px;
}

.qr-section h4 {
    color: #059669;
    font-size: 1rem;
    margin-bottom: 8px;
}

.qr-instruction {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 10px;
}