/* ===================================================
   WATCHPAY – MAIN STYLESHEET (Dark / Light Theme)
   =================================================== */

/* ----- Colour Variables (Dark default) ----- */
:root {
    --bg: #0a0a0a;
    --card-bg: #111;
    --header-bg: #000;
    --nav-bg: #000;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --green: #10b981;
    --red: #ef4444;
    --yellow: #f59e0b;
    --border: rgba(255,255,255,0.08);
    --white-line: rgba(255,255,255,0.1);
    --input-bg: #1e1e1e;
    --input-border: #333;
    --btn-upi-bg: #000;
    --btn-upi-text: #fff;
    --auth-bg: #111;
    --auth-input-bg: #1e1e1e;
    --auth-input-border: #333;
}

/* ----- Light Theme overrides ----- */
[data-theme="light"] {
    --bg: #f5f7fa;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --nav-bg: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: rgba(0,0,0,0.08);
    --white-line: rgba(0,0,0,0.06);
    --input-bg: #f1f5f9;
    --input-border: #e2e8f0;
    --btn-upi-bg: #0f172a;
    --btn-upi-text: #ffffff;
    --auth-bg: #ffffff;
    --auth-input-bg: #f1f5f9;
    --auth-input-border: #e2e8f0;
}

/* ----- Base Reset ----- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 70px;
    transition: background 0.3s, color 0.3s;
    min-height: 100vh;
}

/* ----- Reusable Container ----- */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== HEADER ========== */
.header {
    background: var(--header-bg);
    color: var(--text);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}
.header .logo {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text);
}
.header .wallet {
    background: var(--green);
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
}

/* ----- Theme Toggle Button (placed in header) ----- */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    transition: background 0.2s;
}
.theme-toggle:hover {
    background: var(--border);
}

/* ========== CARDS ========== */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: background 0.3s, border-color 0.3s;
}

/* ========== BUTTONS ========== */
.btn {
    display: block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    text-align: center;
    color: white;
}
.btn-primary {
    background: var(--green);
    color: #fff;
}
.btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
}
.btn-upi {
    background: var(--btn-upi-bg);
    color: var(--btn-upi-text);
}
.btn-upi:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}
.btn-logout {
    background: var(--red);
    color: white;
    margin-top: 10px;
}
.btn-danger {
    background: var(--red);
    color: white;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
}
.btn-danger:hover {
    background: #dc2626;
}

/* ========== BOTTOM NAVIGATION ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 1000;
    border-top: 1px solid var(--border);
    transition: background 0.3s;
}
.nav-item {
    color: var(--muted);
    text-align: center;
    text-decoration: none;
    font-size: 0.75rem;
    flex: 1;
    transition: color 0.2s;
}
.nav-item.active,
.nav-item:hover {
    color: var(--text);
}
.nav-item .icon {
    font-size: 1.4rem;
    display: block;
    margin-bottom: 3px;
}

/* ========== FORM STYLES (Login / Register / Forgot) ========== */
.auth-form {
    background: var(--auth-bg);
    padding: 30px;
    border-radius: 25px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 420px;
    margin: 50px auto;
    color: var(--text);
    transition: background 0.3s;
}
.auth-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--text);
}
.auth-form input,
.auth-form select {
    width: 100%;
    padding: 14px;
    margin-bottom: 18px;
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-input-border);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}
.auth-form input:focus {
    border-color: var(--green);
}
.auth-form button {
    width: 100%;
    padding: 14px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.auth-form button:hover {
    background: #059669;
}

.error {
    color: var(--red);
    margin-bottom: 15px;
    font-size: 0.9rem;
}
.success {
    color: var(--green);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* ========== MOBILE RESPONSIVE ========== */
@media screen and (max-width: 480px) {
    .auth-form {
        margin: 30px 15px;
        padding: 25px 20px;
    }
}