/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gold: #fbbf24;
    --gold-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --nav-height: 65px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    padding-bottom: var(--nav-height);
    /* For bottom nav */
}

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

a:hover {
    color: var(--accent-hover);
}

.bg-darker {
    background-color: var(--bg-darker) !important;
}

.bg-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-brand img {
    height: 40px;
}

/* Gradient Texts */
.text-gold {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-warning {
    color: var(--warning) !important;
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-gold {
    background: var(--gold-gradient);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
}

.btn-gold:hover {
    opacity: 0.9;
    color: #fff;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    height: var(--nav-height);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s;
}

.bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.bottom-nav-item.active {
    color: var(--accent);
}

.bottom-nav-item:hover {
    color: var(--accent);
}

/* Market Cards */
.market-card {
    text-align: center;
    padding: 20px;
    margin-bottom: 15px;
    transition: transform 0.2s;
}

.market-card:hover {
    transform: translateY(-2px);
}

.market-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--gold);
}

.market-time {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.market-result {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 10px 0;
    color: var(--success);
}

.market-status {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
}

.status-running {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-closed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Forms */
.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    padding: 12px;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    color: #fff;
    box-shadow: none;
}

.form-label {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 6px;
}

/* Wallet Card */
.wallet-card {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.wallet-card::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

/* Alerts */
.alert-custom {
    border-radius: 8px;
    border: none;
}

.alert-danger-custom {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success-custom {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

@media (min-width: 768px) {
    .container-app {
        max-width: 500px;
        /* Mobile app style width on desktop */
        margin: 0 auto;
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        border-right: 1px solid rgba(255, 255, 255, 0.05);
        min-height: 100vh;
        background: var(--bg-dark);
    }
}

/* Light Theme Variables and Overrides */
:root {
    --app-bg: #f5f5f5;
    --card-bg: #ffffff;
    --text-dark: #212529;
    --text-gray: #6c757d;
    --sara-yellow: #fdb813;
    --sara-yellow-hover: #e0a00b;
    --border-light: #e0e0e0;
}

body.light-theme {
    background-color: var(--app-bg) !important;
    color: var(--text-dark) !important;
}

.light-theme .bg-card {
    background-color: var(--card-bg) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid var(--border-light) !important;
}

.light-theme .text-white {
    color: var(--text-dark) !important;
}

.light-theme .bg-dark {
    background-color: var(--card-bg) !important;
}

/* Custom Sara777 Header */
.sara-header {
    background-color: var(--app-bg);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.sara-brand {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

.sara-pill {
    background-color: var(--sara-yellow);
    border-radius: 20px;
    padding: 2px 10px;
    margin-right: 2px;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 20px;
    color: var(--text-dark);
}

/* Home Top Section */
.marquee-container {
    background-color: var(--app-bg);
    color: #d32f2f;
    padding: 8px 0;
    font-weight: 600;
    font-size: 16px;
    margin-top: 5px;
}

.king-buttons {
    display: flex;
    gap: 15px;
    padding: 10px 15px;
    justify-content: center;
}

.btn-king {
    background-color: var(--sara-yellow);
    color: var(--text-dark);
    border-radius: 30px;
    padding: 8px 15px;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    border: none;
    box-shadow: 0 2px 4px rgba(253, 184, 19, 0.3);
}

.btn-king i {
    background-color: white;
    color: var(--text-dark);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.whatsapp-contact {
    padding: 5px 15px 15px;
    color: #212529;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.whatsapp-contact i {
    color: #25D366;
    font-size: 20px;
}

/* New Market Card */
.market-card-light {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 0px;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
}

.market-info-left {
    flex: 1;
}

.market-name {
    font-size: 18px;
    font-weight: 800;
    color: #222;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.market-number-large {
    font-size: 20px;
    font-weight: 800;
    color: var(--sara-yellow);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.market-timings {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #444;
}

.market-timings div {
    display: flex;
    flex-direction: column;
}

.market-action-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.status-text {
    font-size: 13px;
    color: #a855f7;
}

.status-text.closed {
    color: #9f1239;
}

.status-text.running {
    color: #15803d;
}

.play-btn-circle {
    width: 45px;
    height: 45px;
    background-color: var(--sara-yellow);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    font-size: 18px;
    text-decoration: none;
    margin-top: 5px;
    margin-bottom: 5px;
    margin-left: auto;
    margin-right: auto;
}

.play-btn-text {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    text-align: center;
}

/* Light Bottom Nav */
.bottom-nav-light {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    height: 65px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    z-index: 1000;
    padding: 0 5px;
    max-width: 500px;
    margin: 0 auto;
}

.nav-item-light {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-dark);
    font-size: 11px;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
    position: relative;
}

.nav-item-light i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item-light.active {
    color: var(--sara-yellow);
}

.nav-fab-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-fab {
    width: 60px;
    height: 60px;
    background-color: var(--sara-yellow);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-dark);
    font-size: 24px;
    transform: translateY(-15px);
    box-shadow: 0 4px 10px rgba(253, 184, 19, 0.4);
    border: 4px solid var(--card-bg);
    text-decoration: none;
}