/* ============================================
   Snapchat — Simple Clean Dark Reskin
   ============================================ */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0f;
    color: #f1f1f1;
    min-height: 100vh;
}

.hidden { display: none !important; }

.app {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* Topbar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background: #0a0a0f;
    z-index: 10;
}

.back-btn, .menu-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #141419;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    cursor: pointer;
    transition: all 180ms ease;
    text-decoration: none;
}

.back-btn:hover, .menu-btn:hover {
    background: #1a1a21;
    color: #f1f1f1;
    border-color: rgba(255,255,255,0.1);
}

.topbar-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fffc00;
}

/* Input */
.input-area { margin-bottom: 16px; }

.input-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #141419;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    transition: border-color 180ms ease;
}

.input-box:focus-within {
    border-color: rgba(255,252,0,0.3);
}

.search-icon { color: #555; flex-shrink: 0; }

.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #f1f1f1;
    font-size: 0.9375rem;
    font-family: inherit;
    flex: 1;
    width: 100%;
}

.search-input::placeholder { color: #555; }

/* Connect Button */
.connect-wrap { margin-bottom: 24px; }

.connect-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: #fffc00;
    color: #0a0a0f;
    cursor: pointer;
    transition: all 180ms ease;
    font-family: inherit;
}

.connect-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(255,252,0,0.15);
}

.connect-btn:active:not(:disabled) { transform: scale(0.99); }
.connect-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.connect-btn.connected {
    background: linear-gradient(135deg, #e4405f, #f77737);
    color: #fff;
}

/* Features */
.features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #141419;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    cursor: pointer;
    transition: all 180ms ease;
    text-align: left;
    width: 100%;
    color: inherit;
}

.feature:hover:not(:disabled) {
    background: #1a1a21;
    transform: translateY(-1px);
}

.feature:hover:not(:disabled) .feature-chevron {
    color: #666;
    transform: translateX(2px);
}

.feature:active:not(:disabled) { transform: scale(0.99); }

.feature:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,252,0,0.08);
    border: 1px solid rgba(255,252,0,0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fffc00;
    flex-shrink: 0;
    transition: transform 180ms ease;
}

.feature:hover .feature-icon { transform: scale(1.05); }

.feature-icon svg { width: 20px; height: 20px; }

.feature-text { flex: 1; min-width: 0; }

.feature-text h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #f1f1f1;
    margin-bottom: 2px;
}

.feature-text p {
    font-size: 0.8125rem;
    color: #555;
    line-height: 1.4;
}

.feature-chevron {
    color: #333;
    flex-shrink: 0;
    transition: all 180ms ease;
}

/* Progress Modal */
.progress-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.progress-modal.hidden { display: none; }

.progress-box {
    background: #141419;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 32px;
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.5);
}

.progress-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #f1f1f1;
    margin: 0;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: #1a1a21;
    border-radius: 9999px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fffc00, #ffe033);
    width: 0%;
    transition: width 0.3s ease-out;
    border-radius: 9999px;
}

.progress-numbers {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-percent {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fffc00;
}

.progress-label {
    font-size: 0.875rem;
    color: #555;
}

.progress-user {
    font-size: 0.8125rem;
    color: #555;
    margin: 0;
}

.progress-user span {
    color: #fffc00;
    font-weight: 600;
}

/* Spinner for connecting state */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: #0a0a0f;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

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

/* Focus */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid #fffc00;
    outline-offset: 2px;
}

@media (max-width: 380px) {
    .app { padding: 0 16px 32px; }
    .feature { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
