/* assets/css/style.css - Quotex Dark Theme Styling */
:root {
    --bg-darkest: #0c0f17;
    --bg-dark: #131722;
    --bg-card: #1e222d;
    --bg-card-hover: #262b3d;
    --border-color: #2a2e39;
    --text-primary: #ffffff;
    --text-muted: #787b86;
    --green-up: #00e676;
    --green-up-hover: #00c853;
    --red-down: #ff3344;
    --red-down-hover: #d50000;
    --accent-blue: #2962ff;
    --accent-blue-hover: #1e4bd8;
    --gold: #ffb300;
}

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

body {
    background-color: var(--bg-darkest);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

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

/* Header */
.quotex-header {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.brand-logo i {
    color: var(--green-up);
    font-size: 24px;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-account-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-type-select {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

.header-balance {
    font-size: 17px;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
    color: var(--text-primary);
}

.btn-refill-demo {
    background: rgba(41, 98, 255, 0.15);
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refill-demo:hover {
    background: var(--accent-blue);
    color: #fff;
}

.today-pnl-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-deposit {
    background: linear-gradient(135deg, var(--green-up), #00b0ff);
    color: #000;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 6px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.15s;
}

.btn-deposit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.3);
}

.btn-withdraw {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #fff;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-withdraw:hover {
    background: var(--bg-card-hover);
}

.user-profile-menu {
    position: relative;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
}

/* Main Trading Area */
.trading-workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - 61px);
    min-height: 520px;
}

.chart-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    position: relative;
    border-right: 1px solid var(--border-color);
    min-height: 480px;
    min-width: 0;
}

.chart-toolbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    z-index: 10;
}

.pair-scroller {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.pair-select-btn {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
}

.pair-select-btn:hover {
    border-color: var(--accent-blue);
}

.pair-select-btn.active {
    background: rgba(41, 98, 255, 0.15);
    border-color: var(--accent-blue);
    color: #fff;
}

.pair-payout-tag {
    background: rgba(0, 230, 118, 0.2);
    color: var(--green-up);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
}

.timeframe-group {
    display: flex;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.timeframe-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.timeframe-btn:hover {
    color: #fff;
}

.timeframe-btn.active {
    background: var(--accent-blue);
    color: #fff;
}

.chart-canvas-container {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 440px;
    min-width: 0;
    overflow: hidden;
}

#quotexChart {
    display: block;
    width: 100%;
    height: 100%;
}

/* Trading Right Sidebar */
.trading-sidebar {
    width: 320px;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
    overflow-y: auto;
}

.side-control-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
}

.control-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.duration-pills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.duration-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 8px 4px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}

.duration-btn:hover {
    border-color: var(--accent-blue);
}

.duration-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
}

.amt-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    margin-bottom: 8px;
}

.amt-input-wrap span {
    color: var(--text-muted);
    font-size: 18px;
    font-weight: bold;
    margin-right: 6px;
}

.amt-input-wrap input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
    width: 100%;
    outline: none;
}

.amt-quick-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.amt-step-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 0;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
}

.amt-step-btn:hover {
    color: #fff;
    border-color: #555;
}

/* Expected Payout Banner */
.payout-preview-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 4px 0;
}

.expected-val {
    color: var(--green-up);
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
}

/* Call and Put Big Buttons */
.action-buttons-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-trade-action {
    width: 100%;
    padding: 14px 20px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.1s, filter 0.2s;
}

.btn-trade-action:active {
    transform: scale(0.98);
}

.btn-call {
    background: var(--green-up);
    color: #000;
}

.btn-call:hover {
    background: var(--green-up-hover);
}

.btn-put {
    background: var(--red-down);
    color: #fff;
}

.btn-put:hover {
    background: var(--red-down-hover);
}

/* Recent Trades Tab */
.recent-trades-container {
    flex: 1;
    overflow-y: auto;
    max-height: 250px;
}

/* Toast Container */
#toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.custom-toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    font-size: 14px;
    font-weight: 600;
    pointer-events: auto;
    animation: slideIn 0.3s ease-out forwards;
    transition: all 0.3s;
}

.custom-toast.hide {
    opacity: 0;
    transform: translateX(50px);
}

.toast-success {
    border-left: 4px solid var(--green-up);
}

.toast-error {
    border-left: 4px solid var(--red-down);
}

.toast-info {
    border-left: 4px solid var(--accent-blue);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    padding: 8px 12px;
    justify-content: space-around;
    z-index: 1000;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.mobile-nav-link.active {
    color: var(--accent-blue);
}

.mobile-nav-link i {
    font-size: 18px;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .trading-workspace {
        flex-direction: column;
        height: auto;
        padding-bottom: 70px;
    }

    .chart-section {
        height: 55vh;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .trading-sidebar {
        width: 100%;
        max-height: none;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .desktop-nav-links {
        display: none;
    }
}
