:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --secondary: #6366f1;
    --accent: #f59e0b;
    --bg-light: #f0fdf4;
    --bg-white: #ffffff;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 10px 40px rgba(0,0,0,0.1);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --header-height: 64px;
    --footer-height: 56px;
}

.app-header.hidden,
.app-footer.hidden {
    display: none !important;
}

/* HEADER */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    z-index: 150;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    height: 100%;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-header .logo-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.app-header .logo-icon svg {
    width: 100%;
    height: 100%;
}

.header-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.header-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 0.2px;
}

.header-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.header-badge {
    display: none;
}

@media (min-width: 480px) {
    .header-badge {
        display: inline-flex;
        align-items: center;
        padding: 6px 12px;
        border-radius: 999px;
        background: var(--bg-light);
        color: var(--primary-dark);
        font-size: 0.75rem;
        font-weight: 600;
        border: 1px solid rgba(16,185,129,0.15);
    }
}

/* FOOTER */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0,0,0,0.06);
    z-index: 150;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    height: 100%;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.footer-brand strong {
    font-size: 0.8rem;
    color: var(--text-dark);
}

.footer-brand span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.footer-links {
    display: none;
    gap: 14px;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
}

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

.footer-copyright {
    display: none;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (min-width: 640px) {
    .footer-links {
        display: flex;
    }
    .footer-copyright {
        display: block;
    }
    .footer-inner {
        justify-content: space-between;
    }
}

#screen-survey, #screen-welcome, #screen-menu, #screen-vr {
    display: none;
    width: 100%;
    height: 100%;
    position: fixed;
    inset: 0;
}

#screen-survey.active, #screen-welcome.active, #screen-menu.active, #screen-vr.active {
    display: block;
}

.screen-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, #fef3c7 0%, #d1fae5 40%, #a7f3d0 100%);
    overflow: hidden;
}

#screen-survey .screen-bg::before,
#screen-menu .screen-bg::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(16,185,129,0.3), transparent);
}

#screen-menu .screen-bg {
    background: #ffffff;
}

#screen-welcome .screen-bg {
    background: linear-gradient(180deg, #d1fae5 0%, #a7f3d0 50%, #6ee7b7 100%);
}

#screen-vr {
    background: var(--bg-darker);
    z-index: 1;
}

/* SURVEY CARD */
.survey-card {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    padding-top: calc(var(--header-height) + 20px);
    padding-bottom: calc(var(--footer-height) + 20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.survey-header {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    justify-content: center;
}

.logo-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo.mini .logo-icon {
    width: 40px;
    height: 40px;
}

.logo-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.survey-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.survey-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.survey-form {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

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

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

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

.option-group {
    display: flex;
    gap: 10px;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.option-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    position: relative;
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-card.selected {
    border-color: var(--primary);
    background: #ecfdf5;
}

.option-avatar {
    font-size: 2rem;
    line-height: 1;
}

.option-icon {
    font-size: 2rem;
    line-height: 1;
}

.option-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dark);
}

.location-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.location-detected {
    color: #047857;
    font-weight: 500;
}

.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    box-shadow: 0 4px 14px rgba(16,185,129,0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16,185,129,0.5);
}

.privacy-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 12px;
}

.privacy-note a {
    color: #065f46;
    text-decoration: underline;
}

.privacy-bottom {
    text-align: center;
    margin-top: 20px;
    padding-bottom: 20px;
}

.privacy-bottom a {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-decoration: underline;
}

/* WELCOME SCREEN */
.welcome-card {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 24px;
    padding-top: calc(var(--header-height) + 24px);
    padding-bottom: calc(var(--footer-height) + 24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    text-align: center;
}

.welcome-image {
    width: 180px;
    height: 180px;
    margin-bottom: 24px;
}

.welcome-image svg {
    width: 100%;
    height: 100%;
}

.welcome-card h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.5;
}

.highlight {
    color: var(--primary-dark);
    font-weight: 700;
}

.welcome-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.welcome-footer {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 24px;
    text-align: center;
}

.welcome-footer p {
    color: var(--text-dark);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.welcome-footer .small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* MENU SCREEN */
.menu-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-top: calc(var(--header-height) + 20px);
    padding-bottom: calc(var(--footer-height) + 20px);
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
}

.menu-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.menu-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 32px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    flex: 1;
    align-content: start;
    padding-bottom: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
}

.menu-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 0;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    overflow: hidden;
}

.menu-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    border-color: var(--primary);
}

.menu-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f3f4f6;
}

.menu-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.menu-card:hover .menu-card-image img {
    transform: scale(1.08);
}

.menu-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--primary);
    color: white;
}

.menu-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.menu-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.4;
}

.btn-kunjungi {
    margin-top: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(16,185,129,0.3);
    width: 100%;
}

.btn-kunjungi:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.4);
}

.menu-icon {
    display: none;
}

/* MODAL */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    z-index: 1;
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    max-width: 360px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
}

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

.spot-btn {
    aspect-ratio: 1;
    padding: 0;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    min-height: 56px;
}

.spot-btn:hover {
    border-color: var(--primary);
    background: #ecfdf5;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(16,185,129,0.2);
}

/* RESPONSIVE */
#screen-vr {
    background: var(--bg-darker);
}

#screen-vr #vr-viewer {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: var(--bg-darker);
    cursor: grab;
}

#screen-vr #vr-ui {
    position: fixed;
    z-index: 100;
    inset: 0;
    pointer-events: none;
}

#screen-vr #vr-ui.hidden {
    opacity: 0;
    pointer-events: none;
}

#screen-vr #vr-ui > * {
    pointer-events: auto;
}

#screen-vr #vr-fade {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#screen-vr #vr-fade.fade-active {
    opacity: 1;
}

/* RESPONSIVE */
@media (max-width: 400px) {
    .option-group {
        flex-direction: column;
    }
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .header-subtitle {
        display: none;
    }
}

@media (min-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-links {
        display: flex;
    }
    .footer-copyright {
        display: block;
    }
    .footer-inner {
        justify-content: space-between;
    }
}

/* VR fullscreen hides header/footer */
#screen-vr.active ~ #app-header,
#screen-vr.active ~ #app-footer {
    display: none;
}

#screen-vr ~ #app-header,
#screen-vr ~ #app-footer {
    display: none;
}

#screen-vr:not(.active) ~ #app-header,
#screen-vr:not(.active) ~ #app-footer {
    display: block;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.7rem;
    border-radius: 6px;
    cursor: pointer;
}

/* ===== DATA CATEGORY MODAL ===== */
#modal-data .modal-content {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px;
}

#modal-data .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

#modal-data .modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

#modal-data-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 16px;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 4px;
}

.data-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.data-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #10b981;
}

.data-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #e5e7eb;
    display: block;
}

.data-card-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.data-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.data-card-desc {
    font-size: 0.78rem;
    color: #4b5563;
    line-height: 1.5;
    flex: 1;
}

.data-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 0.75rem;
    color: #6b7280;
}

.data-card-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ecfdf5;
    color: #065f46;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 500;
}

.data-card-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fef3c7;
    color: #92400e;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600;
}

.data-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fef9c3;
    color: #854d0e;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600;
}

.data-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.data-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

@media (max-width: 640px) {
    #modal-data .modal-content {
        max-width: 100%;
        width: 100%;
        max-height: 95vh;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        padding: 16px;
    }
    .data-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Landing page modals used by VR data categories */
.landing-active .modal {
    z-index: 2000;
}

.landing-active .modal-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
