/* =====================================================
   GUESTBOOK — Host Interface Styles
   ===================================================== */

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --host-primary: #0f172a;
    --host-accent: #2563eb;
    --host-bg: #f8fafc;
    --host-card: #ffffff;
    --host-text: #1a1a1a;
    --host-text-muted: #64748b;
    --host-border: #e2e8f0;
    --host-success: #10b981;
    --host-warning: #f59e0b;
    --host-danger: #ef4444;
    --host-radius: 12px;
    --host-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --host-shadow-lg: 0 4px 12px rgba(0,0,0,0.1), 0 12px 32px rgba(0,0,0,0.06);
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-body);
    background: var(--host-bg);
    color: var(--host-text);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }

a { color: var(--host-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 12px 24px;
    font-family: var(--font-heading); font-size: 15px; font-weight: 600;
    border: none; border-radius: var(--host-radius); cursor: pointer;
    text-decoration: none; transition: all 0.2s ease;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--host-accent); color: #fff; }
.btn-primary:hover { background: #1d4ed8; box-shadow: var(--host-shadow); }

.btn-secondary { background: var(--host-card); color: var(--host-text); border: 1px solid var(--host-border); }
.btn-secondary:hover { background: #f1f5f9; }

.btn-danger { background: transparent; color: var(--host-danger); border: 1px solid var(--host-danger); }
.btn-danger:hover { background: var(--host-danger); color: #fff; }

.btn-large { padding: 16px 32px; font-size: 18px; }
.btn-small { padding: 8px 16px; font-size: 13px; }
.btn-full { width: 100%; }

/* ─── Alerts ─── */
.alert {
    padding: 14px 18px; border-radius: var(--host-radius);
    font-size: 15px; margin-bottom: 20px;
}
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ─── Forms ─── */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; font-weight: 600; font-size: 15px;
    margin-bottom: 6px; color: var(--host-text);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%; padding: 14px 16px;
    font-family: var(--font-body); font-size: 16px;
    border: 2px solid var(--host-border); border-radius: var(--host-radius);
    background: var(--host-card); color: var(--host-text);
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none; border-color: var(--host-accent);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #adb5bd; }

.form-hint { font-size: 13px; color: var(--host-text-muted); font-weight: 400; }

.form-group-checkbox label {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; font-weight: 500;
}
.form-group-checkbox input[type="checkbox"] {
    width: 20px; height: 20px; accent-color: var(--host-accent);
}

.form-group input[type="color"] {
    width: 60px; height: 42px; padding: 4px; cursor: pointer;
    border: 2px solid var(--host-border); border-radius: 8px;
}

.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > .form-group { flex: 1; min-width: 120px; }
.form-row-thirds > .form-group { flex: 0 1 auto; }

.form-section { margin-bottom: 36px; }
.form-section h2 { font-size: 20px; margin-bottom: 16px; color: var(--host-primary); }

/* ─── Top Nav ─── */
.top-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; background: var(--host-card);
    border-bottom: 1px solid var(--host-border);
}
.nav-logo {
    font-family: var(--font-heading); font-size: 20px; font-weight: 800;
    color: var(--host-text); text-decoration: none;
}
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-user { font-size: 14px; color: var(--host-text); font-weight: 600; }
.nav-link { font-size: 14px; color: var(--host-text); text-decoration: none; font-weight: 700; }
.nav-link:hover { color: var(--host-accent); text-decoration: none; }

/* ─── Landing Page ─── */
.landing-page { background: linear-gradient(180deg, #f8fafc 0%, #e8edf5 100%); }
.landing-container { max-width: 900px; margin: 0 auto; padding: 40px 24px; text-align: center; }

.landing-header { margin-bottom: 40px; }
.landing-icon { font-size: 56px; margin-bottom: 12px; }
.landing-header h1 { font-size: 48px; color: var(--host-primary); margin-bottom: 8px; }
.landing-tagline { font-size: 22px; color: var(--host-text-muted); font-weight: 500; }

.landing-hero-image {
    margin-bottom: 32px; border-radius: 16px; overflow: hidden;
    box-shadow: var(--host-shadow-lg);
}
.landing-hero-image img {
    width: 100%; height: auto; display: block;
    max-height: 400px; object-fit: cover;
}

.landing-description {
    font-size: 18px; line-height: 1.7; max-width: 650px; margin: 0 auto 40px;
    color: #4a5568;
}

.landing-features {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 16px; margin-bottom: 40px; text-align: left;
}
.feature-card {
    background: var(--host-card); padding: 24px;
    border-radius: var(--host-radius); box-shadow: var(--host-shadow);
}
.feature-icon { font-size: 32px; display: block; margin-bottom: 12px; }
.feature-card h3 { font-size: 17px; margin-bottom: 6px; color: var(--host-primary); }
.feature-card p { font-size: 14px; color: var(--host-text-muted); line-height: 1.5; }

.landing-pricing { margin-bottom: 36px; }
.price-badge {
    display: inline-flex; flex-direction: column; align-items: center;
    background: var(--host-accent); color: #fff; padding: 20px 40px;
    border-radius: 16px; margin-bottom: 12px;
}
.price-amount { font-size: 42px; font-weight: 800; font-family: var(--font-heading); }
.price-label { font-size: 14px; opacity: 0.8; text-transform: uppercase; letter-spacing: 2px; }
.landing-pricing p { font-size: 15px; color: var(--host-text-muted); }

.landing-cta { margin-bottom: 40px; }
.landing-login { margin-top: 16px; font-size: 15px; color: var(--host-text-muted); }
.landing-footer { padding-top: 24px; border-top: 1px solid var(--host-border); }
.landing-footer p { font-size: 13px; color: var(--host-text-muted); }

/* ─── Auth Pages ─── */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.auth-container {
    width: 100%; max-width: 440px; background: var(--host-card);
    padding: 40px 32px; border-radius: 16px; box-shadow: var(--host-shadow-lg);
}
.auth-logo {
    display: block; text-align: center; font-family: var(--font-heading);
    font-size: 24px; font-weight: 800; color: var(--host-text);
    text-decoration: none; margin-bottom: 24px;
}
.auth-container h1 { text-align: center; font-size: 28px; margin-bottom: 8px; }
.auth-subtitle { text-align: center; font-size: 15px; color: var(--host-text-muted); margin-bottom: 28px; }
.auth-form { margin-bottom: 20px; }
.auth-switch, .auth-forgot { text-align: center; font-size: 14px; color: var(--host-text-muted); margin-top: 12px; }

/* ─── Dashboard ─── */
.dashboard-container { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }
.dashboard-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.dashboard-header h1 { font-size: 28px; }

.empty-state {
    text-align: center; padding: 60px 24px;
    background: var(--host-card); border-radius: var(--host-radius);
    box-shadow: var(--host-shadow);
}
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h2 { font-size: 22px; margin-bottom: 8px; }
.empty-state p { font-size: 15px; color: var(--host-text-muted); margin-bottom: 24px; max-width: 500px; margin-left: auto; margin-right: auto; }

.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

.event-card {
    background: var(--host-card); border-radius: var(--host-radius);
    box-shadow: var(--host-shadow); padding: 24px; transition: box-shadow 0.2s;
}
.event-card:hover { box-shadow: var(--host-shadow-lg); }
.event-card-unpaid { border: 2px dashed var(--host-warning); opacity: 0.85; }
.event-card-unpaid-banner {
    background: #fffbeb; color: #92400e; padding: 12px 16px;
    border-radius: 8px; font-size: 14px; font-weight: 500;
    margin-bottom: 12px; text-align: center; line-height: 1.5;
}
.event-card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.event-card-icon { font-size: 32px; }
.event-card-header h3 { font-size: 18px; margin-bottom: 2px; }
.event-card-type { font-size: 13px; color: var(--host-text-muted); }

.event-card-stats { display: flex; gap: 16px; margin-bottom: 16px; }
.stat { text-align: center; flex: 1; }
.stat-number { display: block; font-size: 20px; font-weight: 700; font-family: var(--font-heading); white-space: nowrap; }
.stat-label { font-size: 11px; color: var(--host-text-muted); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.stat-warning { color: var(--host-warning); }
.stat-expired { color: var(--host-danger); }

.event-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.event-card-link {
    display: flex; align-items: center; gap: 8px; padding-top: 12px;
    border-top: 1px solid var(--host-border); font-size: 12px;
}
.link-label { color: var(--host-text-muted); }
.event-card-link code {
    font-size: 12px; background: #f1f5f9; padding: 4px 8px;
    border-radius: 6px; word-break: break-all;
}

/* ─── Create Event ─── */
.create-container { max-width: 700px; margin: 0 auto; padding: 32px 24px; }
.create-container h1 { font-size: 28px; margin-bottom: 8px; }
.create-subtitle { font-size: 15px; color: var(--host-text-muted); margin-bottom: 32px; }

.template-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px; margin-bottom: 12px;
}
.template-option { cursor: pointer; display: block; }
.template-option input[type="radio"] { display: none; }
.template-card {
    padding: 16px; border: 2px solid var(--host-border);
    border-radius: var(--host-radius); text-align: center;
    transition: all 0.2s; background: var(--host-card);
}
.template-option input:checked + .template-card {
    border-color: var(--host-accent); background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.template-card:hover { border-color: var(--host-accent); }
.template-icon { font-size: 28px; display: block; margin-bottom: 6px; }
.template-card strong { display: block; font-size: 14px; margin-bottom: 4px; }
.template-desc { display: block; font-size: 11px; color: var(--host-text-muted); line-height: 1.3; }
.template-colors { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.color-dot { width: 16px; height: 16px; border-radius: 50%; }

.create-payment-notice {
    background: #fffbeb; border: 1px solid #fde68a;
    border-radius: var(--host-radius); padding: 14px 18px;
    margin-bottom: 20px; text-align: center;
}
.create-payment-notice p { font-size: 15px; color: #92400e; }

/* ─── QR Code Page ─── */
.qr-container { max-width: 600px; margin: 0 auto; padding: 32px 24px; text-align: center; }
.qr-container h1 { font-size: 28px; margin-bottom: 8px; }
.qr-subtitle { font-size: 15px; color: var(--host-text-muted); margin-bottom: 32px; }

.qr-display { margin-bottom: 28px; }
.qr-printable {
    background: white; padding: 40px; border-radius: 16px;
    box-shadow: var(--host-shadow-lg); display: inline-block;
}
.qr-print-header h2 { font-size: 24px; margin-bottom: 4px; }
.qr-print-header p { font-size: 16px; color: var(--host-text-muted); }
.qr-image { width: 280px; height: 280px; margin: 24px 0; }
.qr-print-url { font-size: 12px; color: var(--host-text-muted); word-break: break-all; }
.qr-print-instruction { font-size: 14px; color: var(--host-text); margin-top: 8px; }

.qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 24px; }

.qr-link-box { margin-bottom: 28px; text-align: left; }
.qr-link-box label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.qr-link-box input {
    width: 100%; padding: 12px 16px; font-size: 14px;
    border: 2px solid var(--host-border); border-radius: var(--host-radius);
    background: #f8f9fa; cursor: pointer;
}

.qr-tips { text-align: left; background: var(--host-card); padding: 24px; border-radius: var(--host-radius); }
.qr-tips h3 { font-size: 16px; margin-bottom: 12px; }
.qr-tips ul { padding-left: 20px; }
.qr-tips li { font-size: 14px; color: var(--host-text-muted); margin-bottom: 8px; }

/* ─── Gallery ─── */
.gallery-container { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }
.gallery-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.gallery-header h1 { font-size: 28px; }
.gallery-stats { font-size: 14px; color: var(--host-text-muted); margin-top: 4px; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

.gallery-card {
    background: var(--host-card); border-radius: var(--host-radius);
    box-shadow: var(--host-shadow); overflow: hidden;
}
.gallery-card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; border-bottom: 1px solid var(--host-border);
}
.media-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.media-badge-audio { background: #ede9fe; color: #6d28d9; }
.media-badge-video { background: #dbeafe; color: #1d4ed8; }
.media-badge-photo { background: #fef3c7; color: #92400e; }
.gallery-card-date { font-size: 12px; color: var(--host-text-muted); }

.gallery-card-guest { padding: 12px 16px; }
.gallery-card-guest strong { display: block; font-size: 16px; }
.gallery-card-guest span { display: block; font-size: 13px; color: var(--host-text-muted); }

.gallery-card-player { padding: 0 16px 12px; }
.gallery-card-player audio { width: 100%; }
.gallery-card-player video { width: 100%; border-radius: 8px; max-height: 300px; }
.gallery-card-player img { width: 100%; border-radius: 8px; max-height: 300px; object-fit: cover; }

.gallery-card-footer {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px; border-top: 1px solid var(--host-border);
}
.duration { font-size: 13px; color: var(--host-text-muted); margin-right: auto; }

/* ─── Settings ─── */
.settings-container { max-width: 700px; margin: 0 auto; padding: 32px 24px; }
.settings-container h1 { font-size: 28px; margin-bottom: 4px; }
.settings-subtitle { font-size: 15px; color: var(--host-text-muted); margin-bottom: 32px; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
    .landing-header h1 { font-size: 32px; }
    .landing-tagline { font-size: 18px; }
    .landing-features { grid-template-columns: repeat(2, 1fr); }
    .events-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
    .template-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-header { flex-direction: column; align-items: flex-start; }
    .qr-printable { padding: 24px; }
    .qr-image { width: 200px; height: 200px; }
    .event-card-stats { gap: 16px; }
}
