:root {
            /* Crypto.com Theme Colors */
            --bg-primary: #080d1b;
            --bg-secondary: #050913;
            --text-primary: #ffffff;
            --text-secondary: #b7bdc6;
            --accent-red: #f23545;
            --accent-green: #00c853;
            --accent-blue: #0091ff;
            --border-color: #2c3035;
            --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            --header-height: 60px;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

        body {
            background-color: var(--bg-primary);
            color: var(--text-primary);
            font-family: var(--font-family);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* --- HEADER --- */
        .navbar {
            height: var(--header-height);
            background-color: var(--bg-secondary);
            display: flex;
            align-items: center;
            padding: 0 40px;
            padding-left: 160px;
            position: sticky;
            top: 0;
            z-index: 500;
        }

        .nav-status {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            font-weight: 500;
            color: var(--accent-green);
        }
        
        .pulse-icon {
            font-size: 10px;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.4; }
            100% { opacity: 1; }
        }

        /* --- MAIN LAYOUT --- */
        .container {
            display: grid;
            grid-template-columns: 1fr 380px;
            gap: 80px;
            max-width: 1200px;
            margin: 40px auto;
            padding: 0 20px;
            flex: 1; /* Pushes footer down */
            width: 100%;
        }

        /* --- LEFT COLUMN: Main Content --- */
        .main-content { display: flex; flex-direction: column; gap: 30px; }

        .breadcrumb { color: var(--text-secondary); font-size: 14px; margin-bottom: 10px; font-weight: 600; }
        .breadcrumb span { cursor: pointer; transition: 0.2s; }
        .breadcrumb span:hover { color: var(--text-primary); }

        .header { display: flex; justify-content: space-between; align-items: flex-start; }

        .coin-selector-wrapper { position: relative; display: inline-block; }
        
        .coin-title {
            display: flex; align-items: center; font-size: 24px; font-weight: 500;
            margin-bottom: 10px; cursor: pointer; user-select: none;
        }
        
        .coin-icon { width: 32px; height: 32px; margin-right: 12px; border-radius: 50%; }

        /* Dropdown for Coins */
        .coin-dropdown {
            display: none; position: absolute; top: 100%; left: 0;
            background: var(--bg-secondary); border: 1px solid var(--border-color);
            border-radius: 8px; width: 220px; z-index: 100;
            box-shadow: 0 4px 15px rgba(0,0,0,0.5);
            max-height: 400px; overflow-y: auto; /* Scrollable if many coins */
        }
        /* Custom Scrollbar for dropdown */
        .coin-dropdown::-webkit-scrollbar { width: 6px; }
        .coin-dropdown::-webkit-scrollbar-track { background: var(--bg-secondary); }
        .coin-dropdown::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

        .coin-dropdown.show { display: block; }
        .dropdown-item {
            padding: 12px 15px; display: flex; align-items: center; gap: 10px;
            cursor: pointer; transition: background 0.2s; border-bottom: 1px solid #1f2329;
        }
        .dropdown-item:last-child { border-bottom: none; }
        .dropdown-item:hover { background: #252b33; }
        .dropdown-item img { width: 20px; height: 20px; border-radius: 50%; }

        .price-container { display: flex; flex-direction: column; gap: 5px; }
        .price { font-size: 36px; font-weight: 700; letter-spacing: -0.5px; }
        
        .price-change { font-size: 18px; font-weight: 500; display: flex; align-items: center; gap: 5px; }
        .price-change.green { color: var(--accent-green); }
        .price-change.red { color: var(--accent-red); }

        .header-actions { display: flex; gap: 15px; color: var(--text-secondary); font-size: 20px; }
        .header-actions i { cursor: pointer; transition: color 0.2s; }
        .header-actions i:hover { color: var(--text-primary); }

        /* CHART SECTION */
        .chart-container {
            height: 400px; position: relative;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 20px; padding-bottom: 20px;
        }

        .chart-controls { display: flex; gap: 8px; margin-bottom: 10px; overflow-x: auto; padding-bottom: 5px; }
        .time-btn {
            background: transparent; border: none; color: var(--text-secondary);
            padding: 6px 15px; border-radius: 20px; cursor: pointer; border: 1px solid var(--border-color);
            font-weight: 600; font-size: 13px; transition: 0.2s; white-space: nowrap;
        }
        .time-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
        .time-btn.active { background: var(--bg-secondary); color: var(--text-primary); }

        /* MARKET DATA GRID */
        .market-data-title { font-size: 20px; font-weight: 500; margin-bottom: 20px; }
        .market-data-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
        .data-item { display: flex; flex-direction: column; }
        .data-label { color: var(--text-secondary); font-size: 14px; margin-bottom: 6px; font-weight: 600; }
        .data-value { font-size: 16px; font-weight: 500; }
        .data-value span.red { color: var(--accent-red); }
        .data-value span.green { color: var(--accent-green); }

        /* --- RIGHT COLUMN: Sidebar --- */
        .sidebar {
            background-color: transparent;
            padding: 24px; border-radius: 12px; height: fit-content;
        }

        .buy-sell-tabs {
            display: flex; border-bottom: 1px solid var(--border-color);
            margin-bottom: 20px;
        }
        .tab-btn {
            flex: 1; background: none; border: none; color: var(--text-secondary);
            padding: 12px; font-size: 16px; font-weight: 600;
            cursor: pointer; position: relative;
        }
        .tab-btn.active { color: var(--text-primary); }
        .tab-btn.active::after {
            content: ''; position: absolute; bottom: -1px; left: 0; width: 100%;
            height: 2px; background-color: var(--accent-blue);
        }

        .input-group {
            background-color: var(--bg-primary); border-radius: 8px;
            padding: 16px; margin-bottom: 16px; border: 2px solid var(--border-color);
            transition: border 0.2s;
        }
        .input-group:focus-within { border-color: var(--accent-blue); }

        .amount-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
        
        .amount-input {
            background: none; border: none; color: var(--text-primary);
            font-size: 24px; font-weight: 600; width: 100%; outline: none;
        }

        .currency-badge {
            display: flex; align-items: center; gap: 6px;
            background: var(--bg-secondary); padding: 6px 10px;
            border-radius: 20px; font-size: 14px; font-weight: 600;
        }

        .conversion-text { color: var(--text-secondary); font-size: 13px; font-weight: 600; }

        .quick-amounts { display: flex; gap: 10px; margin-bottom: 25px; overflow-x: auto; }
        .quick-btn {
            flex: 1; background: #1199fa33; border: none; text-decoration: none;
            color: #92d1ff; padding: 8px; border-radius: 25px;
            font-weight: 500; cursor: pointer; transition: 0.2s; white-space: nowrap;
        }

        .payment-option {
            display: flex; justify-content: space-between; align-items: center; font-weight: 400;
            padding: 14px; border: 2px solid var(--border-color);
            border-radius: 8px; margin-bottom: 12px; cursor: pointer; transition: 0.2s;
        }
        .payment-option:hover { background: #1c2229; }
        .payment-option.selected {
            border-color: var(--accent-blue);
            background-color: rgba(22, 82, 240, 0.1);
        }
        /* Checkmark visibility */
        .payment-option .fa-check-circle {
            display: none;
        }
        .payment-option.selected .fa-check-circle {
            display: block;
            color: var(--accent-blue);
        }

        .buy-btn {
            background-color: var(--accent-blue); color: white; border: none;
            width: 100%; padding: 16px; border-radius: 8px; font-size: 16px;
            font-weight: 600; cursor: pointer; margin-top: 10px; transition: 0.2s;
        }
        .buy-btn:hover { background-color: #0d46d2; }

        /* --- FOOTER --- */
        .footer {
            background-color: var(--bg-secondary);
            border-top: 1px solid var(--border-color);
            padding: 40px 20px;
            margin-top: auto;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 20px;
        }

        .footer-text {
            color: var(--text-secondary);
            font-size: 14px;
        }

        /* Responsive */
        @media (max-width: 900px) {
            .container { grid-template-columns: 1fr; gap: 40px; }
            .sidebar { max-width: 100%; border-top: 1px solid var(--border-color); padding-top: 40px; margin-top: 20px; }
            .market-data-grid { grid-template-columns: repeat(2, 1fr); }
            
            .navbar { padding: 0 20px; }
            .footer-content { flex-direction: column; text-align: center; }
        }
        
        /* Loader */
        .loading-overlay {
            position: fixed; top:0; left:0; width:100%; height:100%;
            background: var(--bg-primary); z-index: 999;
            display: flex; justify-content: center; align-items: center;
            transition: opacity 0.5s;
        }
        .spinner {
            width: 40px; height: 40px; border: 4px solid var(--bg-secondary);
            border-top-color: var(--accent-blue); border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }