:root {
    --bg: #0a0e17;
    --bg-card: #121a2b;
    --bg-elevated: #1a2540;
    --border: rgba(255, 255, 255, 0.08);
    --text: #e8ecf4;
    --text-muted: #8b95a8;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --secondary: #22d3ee;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --gradient: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
    --font: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius: 12px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

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

.bg-glow {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(34, 211, 238, 0.08), transparent);
    pointer-events: none;
    z-index: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
}

.logo-icon {
    color: var(--primary);
    font-size: 1.4rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.main-content {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 140px);
}

.site-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.btn-warning {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.btn-danger {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--primary-hover);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0 4rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Auth */
.auth-container {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

/* Forms */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 640px;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.flex-1 { flex: 1; }

/* Page header */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 1.75rem;
}

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

/* Alerts */
.alert {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.hidden { display: none !important; }

.alert.hidden { display: none; }

.alert-error {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: var(--danger);
}

.alert-success {
    background: rgba(52, 211, 153, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: var(--success);
}

/* Secrets grid */
.secrets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.secret-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.secret-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.secret-card h3 {
    font-size: 1.1rem;
}

.secret-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.secret-views {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.view-stats-box {
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.view-stats-box strong {
    color: var(--secondary);
}

.secret-countdown {
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.secret-link-box {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.link-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.secret-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-scheduled { background: rgba(99, 102, 241, 0.2); color: var(--primary-hover); }
.badge-revealed { background: rgba(52, 211, 153, 0.2); color: var(--success); }
.badge-hidden { background: rgba(139, 149, 168, 0.2); color: var(--text-muted); }
.badge-cancelled { background: rgba(248, 113, 113, 0.2); color: var(--danger); }

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state .btn { margin-top: 1rem; }

.loading-text {
    color: var(--text-muted);
}

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

.modal.hidden { display: none; }

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

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow);
}

.modal-content h2 {
    margin-bottom: 0.5rem;
}

.modal-warning {
    color: var(--warning);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.modal-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 1rem 0;
}

.credential-box {
    margin-bottom: 1rem;
}

.credential-box label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.credential-box.highlight {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.copy-row {
    display: flex;
    gap: 0.5rem;
}

.copy-row input {
    flex: 1;
    padding: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.access-code {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--secondary);
    margin: 0.5rem 0;
}

.form-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

.section-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.section-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.status-bar {
    margin: 0.5rem 0;
}

.reveal-info {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-actions {
    margin-top: 1.5rem;
}

.flex-0 { flex: 0 0 auto; }

.live-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 1rem;
    opacity: 0.7;
}

.view-panel {
    width: 100%;
}

.view-container .auth-card,
.view-container .secret-view {
    width: 100%;
    max-width: 480px;
}

/* Public view */
.view-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 2rem 1rem;
    max-width: 520px;
    margin: 0 auto;
}

.secret-view {
    width: 100%;
    max-width: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.secret-view.hidden { display: none; }

.view-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.view-message {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.countdown-box {
    margin: 1.5rem 0;
}

.countdown-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.countdown-display {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reveal-at-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.content-box {
    text-align: left;
    margin-top: 1.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
}

.content-box label {
    display: block;
    font-size: 0.8rem;
    color: var(--success);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.content-box pre {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text);
}

.error-text {
    color: var(--danger);
    text-align: center;
}

@media (max-width: 600px) {
    .site-header { padding: 1rem; }
    .main-content { padding: 1rem; }
    .form-row { flex-direction: column; }
    .page-header { flex-direction: column; }
}
