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

:root {
    --bg-primary: #0A0908;
    --bg-secondary: #121110;
    --bg-card: #1A1816;
    --gold: #C9A227;
    --gold-dim: rgba(201, 162, 39, 0.15);
    --gold-glow: rgba(201, 162, 39, 0.08);
    --text-primary: #F5F5F4;
    --text-secondary: #A8A29E;
    --text-muted: #9F9893;
    --border: #292524;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Loading state for mobile redirect */
.loading-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    padding: 24px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--gold-dim);
    border-radius: 50%;
    border-top-color: var(--gold);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 24px;
}

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

.loading-text {
    font-size: 18px;
    color: var(--text-secondary);
}

.loading-fallback {
    margin-top: 32px;
    display: none;
}

.loading-fallback a {
    color: var(--gold);
    text-decoration: none;
    font-size: 14px;
    border: 1px solid var(--gold);
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.2s;
}

.loading-fallback a:hover {
    background: var(--gold);
    color: var(--bg-primary);
}

/* Desktop container */
.desktop-container {
    display: block;
    min-height: 100vh;
    padding: 60px 24px;
}

.desktop-content {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

/* Logo */
.logo {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 1px;
    margin-bottom: 48px;
}

/* Phone Icon */
.phone-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 32px;
    background: var(--gold-dim);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-icon svg {
    width: 40px;
    height: 40px;
    color: var(--gold);
}

/* Title */
.title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 5vw, 36px);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

/* Subtitle */
.subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 24px;
    line-height: 1.7;
}

/* QR Code Section */
.qr-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
}

.qr-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.qr-code {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-hint {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* Store Badges */
.store-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.store-badge, .store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.store-badge:hover, .store-btn:hover {
    border-color: var(--gold, #d4af37);
    background: #0a0a0a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.25);
    color: #ffffff;
}

.store-badge svg, .store-btn svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.badge-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.15;
}

.badge-sub {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
}

.badge-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.store-btn.disabled, .store-badge.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Install button */
.install-web-btn {
    width: 100%;
    max-width: 380px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border: 1px solid var(--gold);
    border-radius: 12px;
    background: transparent;
    color: var(--gold);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.install-web-btn:hover {
    filter: brightness(1.05);
}

.install-web-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

.install-web-btn svg {
    width: 20px;
    height: 20px;
}

.install-web-subtitle {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 32px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider-text {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Open the web app on this computer */
.web-link-container {
    margin-bottom: 20px;
}

.web-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 380px;
    min-height: 56px;
    margin: 0 auto 10px;
    padding: 16px 24px;
    border: 1px solid var(--gold);
    border-radius: 12px;
    background: var(--gold);
    color: var(--bg-primary);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    transition: filter 0.2s;
}

.web-link:hover {
    filter: brightness(1.08);
}

.web-link:focus-visible, .install-web-btn:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 4px;
}

/* Footer text */
.footer-text {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 320px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Show states */
.show {
    display: flex !important;
}

.show-block {
    display: block !important;
}
