/* ============================================
   VoiceDrop - Shared Styles (mobile-first)
   ============================================ */

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

:root {
    --bg:        #0A0A0A;
    --card:      #161616;
    --border:    #2A2A2A;
    --accent:    #FF4D4D;
    --accent-dk: #E03535;
    --text:      #FFFFFF;
    --muted:     #888888;
    --dim:       #555555;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* ---------- Auth pages (login / signup) ---------- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 24px;
}

.logo {
    font-size: 34px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 6px;
}

.tagline {
    font-size: 14px;
    color: var(--muted);
    letter-spacing: 1px;
    margin-bottom: 40px;
}

.auth-form { width: 100%; max-width: 380px; }

.input {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px 16px;
    color: var(--text);
    font-size: 15px;
    margin-bottom: 14px;
    outline: none;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--dim); }

select.input { appearance: none; }

.btn {
    display: block;
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    margin-top: 4px;
}
.btn:active { background: var(--accent-dk); }

.btn-outline {
    background: var(--card);
    border: 1px solid var(--border);
    font-weight: 500;
}

.info-box {
    background: var(--card);
    border: 1px solid rgba(255, 77, 77, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 18px;
}

.switch-link {
    text-align: center;
    margin-top: 26px;
    color: var(--muted);
    font-size: 14px;
}
.switch-link a { color: var(--accent); font-weight: 700; }

.error-msg {
    background: rgba(255, 77, 77, 0.12);
    border: 1px solid rgba(255, 77, 77, 0.4);
    color: #FF8080;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

.success-msg {
    background: rgba(80, 220, 130, 0.1);
    border: 1px solid rgba(80, 220, 130, 0.35);
    color: #6FE39A;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ---------- App layout (feed / record / profile) ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar .brand { font-size: 20px; font-weight: 800; color: var(--accent); }
.topbar .top-actions { display: flex; gap: 16px; font-size: 14px; color: var(--muted); }

.page { max-width: 520px; margin: 0 auto; padding: 18px 16px 90px; }

/* ---------- Audio post card ---------- */
.post-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

.avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #FF9D4D);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 16px; color: #fff;
    flex-shrink: 0;
}

.post-user { font-weight: 700; font-size: 14px; }
.post-meta { font-size: 12px; color: var(--dim); }

.post-title { font-size: 15px; margin-bottom: 6px; line-height: 1.4; }

.post-category {
    display: inline-block;
    font-size: 12px;
    color: var(--accent);
    background: rgba(255, 77, 77, 0.1);
    border-radius: 20px;
    padding: 4px 12px;
    margin-bottom: 12px;
}

audio { width: 100%; height: 40px; margin-bottom: 12px; }

.post-actions {
    display: flex;
    gap: 22px;
    font-size: 14px;
    color: var(--muted);
    align-items: center;
}
.post-actions button {
    background: none; border: none; color: var(--muted);
    font-size: 14px; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
}
.post-actions button.active { color: var(--accent); }
.listen-count { margin-left: auto; font-size: 12px; color: var(--dim); }

/* ---------- Bottom navigation ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 16px;
    z-index: 10;
}
.bottom-nav a {
    color: var(--muted);
    font-size: 12px;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.bottom-nav a .nav-icon { font-size: 20px; }
.bottom-nav a.active { color: var(--accent); }

.record-fab {
    width: 52px; height: 52px;
    background: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-top: -26px;
    box-shadow: 0 4px 16px rgba(255, 77, 77, 0.45);
}

/* ---------- Record page ---------- */
.record-wrap { text-align: center; padding-top: 30px; }

.mic-button {
    width: 110px; height: 110px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 42px;
    cursor: pointer;
    margin: 26px auto;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.5);
    transition: transform 0.15s;
}
.mic-button:active { transform: scale(0.95); }

.mic-button.recording {
    animation: pulse 1.2s infinite;
    background: var(--accent-dk);
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.5); }
    70%  { box-shadow: 0 0 0 24px rgba(255, 77, 77, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}

.timer { font-size: 30px; font-weight: 700; letter-spacing: 2px; margin-bottom: 6px; }
.record-hint { color: var(--muted); font-size: 14px; margin-bottom: 8px; }

/* ---------- Profile ---------- */
.profile-head { text-align: center; padding: 26px 0 20px; }
.profile-head .avatar { width: 76px; height: 76px; font-size: 30px; margin: 0 auto 12px; }
.profile-anon { font-size: 20px; font-weight: 800; }
.profile-bio { color: var(--muted); font-size: 14px; margin-top: 6px; }

.stats-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.stat { text-align: center; }
.stat .num { font-size: 18px; font-weight: 800; }
.stat .lbl { font-size: 12px; color: var(--muted); }

.section-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: var(--muted); }

.empty-state {
    text-align: center;
    color: var(--dim);
    padding: 50px 20px;
    font-size: 14px;
    line-height: 1.6;
}
