:root {
    --sky-blue: #ffffff;
    --sky-dark: #f8fafc;
    --white: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --accent: #2563eb;
    --gold-bright: #60a5fa;
    --gold-deep: #1d4ed8;
    --success: #ffffff;
    --soft-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --cloud-shadow: 0 10px 20px rgba(0, 0, 0, 0.02);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    color: var(--text-main);
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    touch-action: manipulation;
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Background & Clouds */
.sky-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #f1f5f9, #ffffff);
    z-index: -1;
    overflow: hidden;
}

/* Background Elements Removed */



/* Layout */
main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    scrollbar-width: none;
    padding-bottom: 90px;
    z-index: 1;
}

main::-webkit-scrollbar {
    display: none;
}

/* Navigation */
#bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 75px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    z-index: 100;
    transition: transform 0.3s ease;
}

#bottom-nav.hidden {
    transform: translateY(100%);
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-item i {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.nav-item.active {
    color: var(--accent);
    transform: translateY(-5px);
}

.nav-item-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 0;
}

.floating-support {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--white);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    cursor: pointer;
}

.profile-action-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
}

.profile-action-row:last-child {
    border-bottom: none;
}

/* UI Components */
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-bright), var(--accent));
    color: var(--text-main);
    border: 1px solid rgba(133, 77, 14, 0.2);
    padding: 14px 24px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 16px;
    width: 100%;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.btn-primary:active {
    transform: scale(0.95);
    background: var(--accent);
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
    margin-left: 10px;
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--accent);
    background: white;
}

/* Static Cards */
.item-card-standard, .item-card-mini {
    padding: 18px 20px;
    margin: 15px auto;
    width: 65%;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.item-card-mini {
    padding: 12px 10px;
    min-height: 65px;
    width: 130px;
    cursor: default;
}

.profile-action {
    cursor: pointer;
    transition: background 0.2s ease;
}

.profile-action:hover {
    background: rgba(0, 0, 0, 0.02);
}

select {
    outline: none;
}

select:focus {
    border-color: var(--accent);
    background: white;
}

/* Trading Layout Specifics */
.trading-layout {
    height: 100vh;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f1f5f9;
}

.trading-header {
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-bottom: 1px solid #e2e8f0;
    z-index: 200;
}

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

.header-balances {
    display: flex;
    gap: 15px;
}

.header-menu-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
}

.header-stat-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-val-small {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent);
}

.trading-main-area {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

.trading-sidebar {
    width: 140px;
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 10px 5px;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

.sidebar-mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-mobile-header h3 { font-size: 14px; color: var(--text-main); }
.sidebar-mobile-header button { background: none; border: none; cursor: pointer; color: var(--text-muted); }

.sidebar-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.sidebar-mobile-only { display: none; }

.trading-sidebar::-webkit-scrollbar { display: none; }

.sidebar-scroll-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-card {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 6px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.bot-card {
    background: linear-gradient(135deg, #ffffff, #f0f9ff);
    border: 1px solid var(--accent);
}

.indicator-card {
    background: linear-gradient(135deg, #ffffff, #fffdf0);
    border-color: #f39c12;
}

.indicator-toggles {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.indicator-btn {
    flex: 1;
    background: #f1f5f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 9px;
    font-weight: bold;
    padding: 3px 0;
    cursor: pointer;
    transition: all 0.2s;
}

.indicator-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.indicator-btn#toggle-sma7.active { background: #eab308; }
.indicator-btn#toggle-sma25.active { background: #FF9800; }

.bot-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.bot-input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.bot-input-row label {
    font-size: 10px;
    font-weight: bold;
    color: var(--text-muted);
}

.bot-input-row input {
    width: 45px;
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 11px;
    text-align: center;
}

.bot-start-btn {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 5px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.bot-start-btn.active {
    background: #e74c3c;
}

.investment-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
}

.investment-stepper button {
    background: var(--accent);
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.investment-stepper span {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-main);
    min-width: 50px;
    text-align: center;
}

.trading-container {
    flex: 1;
    position: relative;
    height: 100%;
}

.chart-section-wrapper {
    flex: 1;
    position: relative;
    margin: 5px;
    background: #e2e8f0;
    border-radius: 16px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.chart-section {
    position: relative;
    flex: 1;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    transition: background 0.4s ease;
}

#chart-container {
    width: 100%;
    height: 100% !important;
}

.asset-selector-floating {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.asset-selector-floating select {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0,0,0,0.1);
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.live-price-badge {
    background: var(--accent);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.panel-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panel-group label {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.5px;
}

.panel-group input, .panel-group select {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 2px solid #f1f5f9;
    background: #f8fafc;
    font-weight: bold;
    font-size: 14px;
    outline: none;
}

.panel-group input:focus { border-color: var(--accent); }

.quick-amounts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 4px;
}

.quick-amount-btn {
    background: #f1f5f9;
    border: none;
    padding: 6px 2px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: bold;
    color: #64748b;
}

.side-trading-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.binary-btn {
    width: 100%;
    height: 36px;
    border-radius: 10px;
    border: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    color: white;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.binary-btn i { width: 16px; height: 16px; }

.binary-btn:active { transform: scale(0.92); }

.call-btn { 
    background: #ffffff; 
    color: var(--accent) !important; 
    border: 2px solid var(--accent) !important;
}
.put-btn { background: #ef4444; }

.binary-btn span { font-weight: 800; font-size: 11px; }

.mini-stat { display: flex; flex-direction: column; }
.mini-stat span { font-weight: bold; color: var(--accent); font-size: 16px; }
.mini-stat label { font-size: 9px; color: #94a3b8; font-weight: bold; }

.history-toggle-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* Trading Footer Layout */
.trading-footer {
    position: relative;
    width: 100%;
    height: 80px;
    background: white;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.05);
    z-index: 150;
    display: flex;
    padding: 10px;
    gap: 15px;
    overflow-x: auto;
    scrollbar-width: none;
}

.mobile-trading-bar {
    display: none;
    flex-direction: column;
    background: white;
    padding: 10px;
    gap: 8px;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
}

.bar-top-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.bar-stepper-box {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 12px;
}

.bar-stepper-box button {
    background: var(--accent);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 18px;
}

.bar-stepper-box span { font-weight: 800; font-size: 14px; }

.bar-bottom-row {
    display: flex;
    gap: 10px;
}

.mobile-trade-btn {
    flex: 1;
    height: 50px;
    border-radius: 12px;
    border: none;
    color: white;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.mobile-trade-btn.call { 
    background: #ffffff; 
    color: var(--accent) !important; 
    border: 2px solid var(--accent) !important;
}
.mobile-trade-btn.put { background: #ef4444; }

@media (max-width: 768px) {
    .trading-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(100%);
        background: white;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }
    .trading-sidebar.active {
        transform: translateX(0);
    }
    .sidebar-mobile-header { display: flex; }
    .sidebar-desktop-only { display: none; }
    .sidebar-mobile-only { display: block; }
    
    .trading-footer.desktop-only { display: none; }
    .mobile-trading-bar { display: flex; }
    
    .chart-section-wrapper {
        margin: 0;
        border-radius: 0;
    }
    .chart-section { border-radius: 0; border: none; }
}

.trading-footer::-webkit-scrollbar { display: none; }

.footer-clock-box {
    min-width: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-right: 1px solid rgba(0,0,0,0.1);
    padding-right: 15px;
}

.footer-clock {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

.footer-date {
    font-size: 10px;
    color: var(--text-muted);
}

.trading-history-horizontal {
    display: flex;
    gap: 10px;
    align-items: center;
}

.history-item-pill {
    min-width: 100px;
    height: 60px;
    background: white;
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.history-item-pill.active-trade { border-left: 4px solid var(--accent); }
.history-item-pill.win { border-left: 4px solid var(--accent); }
.history-item-pill.loss { border-left: 4px solid #e74c3c; }

.pill-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.pill-asset { font-size: 10px; font-weight: bold; color: var(--text-muted); }
.pill-value { font-size: 12px; font-weight: 800; }
.pill-timer { font-size: 10px; color: var(--accent); font-weight: bold; }
.pill-status { font-size: 10px; font-weight: 800; text-transform: uppercase; }

.welcome-card-v2 {
    background: white;
    padding: 24px;
    border-radius: 30px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    box-shadow: 0 15px 35px rgba(6, 78, 59, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.1);
    overflow: hidden;
}

.welcome-card-v2::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.welcome-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--gold-bright), var(--accent));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    flex-shrink: 0;
    box-shadow: 0 8px 15px rgba(37, 99, 235, 0.2);
    z-index: 1;
}

.welcome-avatar i {
    width: 32px;
    height: 32px;
}

.welcome-info {
    z-index: 1;
}

.welcome-info h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

.welcome-info .highlight {
    color: var(--accent);
}

.welcome-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.welcome-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    font-size: 10px;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-title { font-weight: bold; margin-bottom: 3px; color: var(--text-main); font-size: 0.9rem; }
.task-value { color: var(--accent); font-weight: 800; font-size: 1.1rem; }

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 1s ease;
}

/* Stats */
.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-val { font-size: 1.4rem; font-weight: bold; color: var(--accent); display: block; }
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }

/* Auth Views */
.auth-header {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 40px;
}

.auth-header h1 {
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 2.5rem;
    font-weight: 800;
}

.auth-header p {
    color: var(--white);
    opacity: 0.9;
}

/* Modal & Bottom Sheet Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 24px 24px 0 0;
    padding: 30px 20px 40px;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-content h3 {
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--text-main);
    text-align: center;
}

/* Notification Styles */
#notification-area {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 200px;
    z-index: 1000;
    pointer-events: none;
}

.trade-notification {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #333;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.trade-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.trade-notification.win { border-left-color: var(--accent); }
.trade-notification.loss { border-left-color: #e74c3c; }

.notification-title { font-weight: bold; font-size: 12px; }
.notification-text { font-size: 11px; color: var(--text-muted); }