:root {
    --bg-deep: #0A0118;
    --bg-card: rgba(255, 255, 255, 0.03);
    --primary-gold: #D4AF37;
    --accent-purple: #A855F7;
    --accent-teal: #06B6D4;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

#app {
    height: 100%;
    width: 100%;
    position: relative;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0A0118 0%, #1a0b3e 50%, #0A0118 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    text-align: center;
}

.splash-logo {
    font-size: 64px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.splash-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    background: linear-gradient(to bottom, #fff, var(--primary-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.splash-subtitle {
    font-size: 14px;
    color: var(--accent-purple);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.splash-loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Page Container */
.page-container {
    height: 100%;
    width: 100%;
    padding-top: var(--safe-area-top);
    padding-bottom: calc(84px + var(--safe-area-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.page {
    display: none;
    flex-direction: column;
    min-height: 100%;
    padding: 20px 24px;
    animation: pageIn 0.3s ease;
}

.page.active {
    display: flex;
}

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

/* Typography */
h1 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    background: linear-gradient(180deg, #FFF, var(--primary-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* Components */
.btn-gold {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #D4AF37, #F59E0B);
    border: none;
    border-radius: 100px;
    color: #000;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
    transition: 0.3s;
    font-family: inherit;
}

.btn-gold:active {
    transform: scale(0.98);
}

.btn-gold:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: var(--text-main);
    font-size: 15px;
    cursor: pointer;
    margin-top: 12px;
    font-family: inherit;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 20px;
    margin-top: 20px;
}

.input-group {
    margin-top: 20px;
}

.input-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
select {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 16px;
    border-radius: 12px;
    color: var(--text-main);
    margin-bottom: 12px;
    outline: none;
    font-family: inherit;
    font-size: 16px;
    -webkit-appearance: none;
}

input:focus {
    border-color: var(--primary-gold);
}

/* Tab Bar */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(84px + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    background: rgba(10, 1, 24, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 12px;
    z-index: 100;
}

.tab-item {
    color: var(--text-muted);
    font-size: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.tab-item.active {
    color: var(--primary-gold);
}

.tab-icon {
    font-size: 24px;
}

/* Avatar */
.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-gold), var(--accent-purple));
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

/* Badge */
.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}

.badge-vip {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.badge-free {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* Notification */
.notify-bell {
    position: relative;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notify-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    border-radius: 100px;
    background: #EF4444;
    color: #fff;
    font-size: 10px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notify-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
}

.notify-unread {
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(212, 175, 55, 0.06);
}

.notify-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.notify-content {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 8px;
}

.notify-time {
    margin-top: 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}

.notify-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
}

.notify-status.unread {
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.15);
}

.notify-status.read {
    color: #94A3B8;
    background: rgba(148, 163, 184, 0.15);
}

/* Scan Circle */
.scan-circle {
    width: 240px;
    height: 320px;
    border-radius: 20px;
    margin: 40px auto;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-gold), transparent);
    box-shadow: 0 0 20px var(--primary-gold);
    animation: scanMove 3s ease-in-out infinite;
}

@keyframes scanMove {
    0%, 100% { top: 10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 90%; opacity: 0; }
}

/* AI Log */
.ai-log-container {
    position: absolute;
    top: 20px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.ai-log-item {
    font-size: 9px;
    color: var(--primary-gold);
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 2px solid var(--primary-gold);
    animation: logIn 0.3s ease;
}

@keyframes logIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Payment Item */
.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.payment-item:active {
    background: rgba(212, 175, 55, 0.1);
    transform: scale(0.98);
}

.payment-item.selected {
    border-color: var(--primary-gold);
    background: rgba(212, 175, 55, 0.1);
}

/* Report Card */
.report-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.report-card:active {
    transform: scale(0.98);
}

.report-icon {
    width: 48px;
    height: 48px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 1, 24, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.loading-text {
    margin-top: 20px;
    color: var(--primary-gold);
    font-size: 14px;
}

/* Header */
.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
}

/* Profile */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
}

.menu-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.menu-item:active {
    background: var(--glass);
    margin: 0 -24px;
    padding: 16px 24px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 12px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-gold), var(--accent-purple));
    transition: width 0.3s ease;
}

/* Capture Button */
.capture-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid #fff;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: none;
    padding: 0;
}

.capture-btn-inner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
}

/* Status Text */
.status-text {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Utility */
.text-center { text-align: center; }
.text-gold { color: var(--primary-gold); }
.mt-auto { margin-top: auto; }
.mb-20 { margin-bottom: 20px; }
.pb-safe { padding-bottom: calc(20px + var(--safe-area-bottom)); }
