:root {
    --bg-primary: #000000;
        --bg-secondary: #000000;
        --text-primary: #e0e0e0;
        --text-secondary: #ffffff;
        --border-color: #000000;
        --chart-bg: #000000;
        --chart-bg-inner: #000000;
        --chart-text: #e0e0e0;
        --chart-border: #000000;
        --stats-bg: #000000;
        --input-bg: #000000;
        --input-border: #000000;
        --shadow: rgba(0,0,0,0.8);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #000000;
        --text-primary: #e0e0e0;
        --text-secondary: #ffffff;
        --border-color: #000000;
        --chart-bg: #000000;
        --chart-bg-inner: #000000;
        --chart-text: #e0e0e0;
        --chart-border: #000000;
        --stats-bg: #000000;
        --input-bg: #000000;
        --input-border: #000000;
        --shadow: rgba(0,0,0,0.8);
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    margin: 40px;
    margin-bottom: 0;
    padding-bottom: 0;
    transition: background-color 0.3s, color 0.3s;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.4s ease-out;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.spinner-ring {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
    border-top-color: #26a69a;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-ring:nth-child(2) {
    width: 100px;
    height: 100px;
    border-top-color: #2196f3;
    animation-delay: -0.5s;
    animation-duration: 2s;
}

.spinner-ring:nth-child(3) {
    width: 120px;
    height: 120px;
    border-top-color: #ff9800;
    animation-delay: -1s;
    animation-duration: 2.5s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 100px;
    font-size: 18px;
    font-weight: 500;
    color: #e0e0e0;
    letter-spacing: 1px;
    animation: pulse 1.5s ease-in-out infinite;
}

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

h1 {
    margin-bottom: 30px;
    color: var(--text-primary);
}

/* Chart container styles */
.chart-container {
    background: var(--chart-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px var(--shadow);
}

/* Stats cards */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--stats-bg);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--chart-border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--chart-text);
    margin-bottom: 4px;
}

.stat-value.positive {
    color: #26a69a;
}

.stat-value.negative {
    color: #ef5350;
}

.stat-secondary {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-asset {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.stat-change.positive {
    background: rgba(38, 166, 154, 0.15);
    color: #26a69a;
}

.stat-change.negative {
    background: rgba(239, 83, 80, 0.15);
    color: #ef5350;
}

.data-quality-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-quality-badge.okx {
    background: rgba(38, 166, 154, 0.15);
    color: #26a69a;
}

.data-quality-badge.mixed {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.data-quality-badge.kraken {
    background: rgba(33, 150, 243, 0.15);
    color: #2196f3;
}

.chart-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    color: var(--chart-text);
    font-size: 14px;
    font-weight: 500;
}

.control-group select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--chart-text);
    font-size: 14px;
    cursor: pointer;
    min-width: 120px;
    transition: border-color 0.2s;
}

.control-group select:hover {
    border-color: #555;
}

.control-group select:focus {
    outline: none;
    border-color: #26a69a;
}

.refresh-btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid #ff9900;
    background: #ff9900;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: #f5b616;
    border-color: #f5b616;
}

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

/* Tools Panel (Below Chart) */
.tools-panel {
    margin-top: 20px;
    padding: 20px;
    background: #000000;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.tools-section {
    flex: 1;
    min-width: 250px;
}

.tools-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.tools-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.tools-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tools-divider {
    width: 1px;
    background: var(--border-color);
    margin: 0 10px;
}

.tool-btn {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tool-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.tool-btn.indicator-btn:hover {
    border-color: #26a69a;
    background: rgba(38, 166, 154, 0.08);
    color: #26a69a;
}

.tool-btn.indicator-btn.active {
    background: linear-gradient(135deg, #26a69a 0%, #2bbbad 100%);
    border-color: #26a69a;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.tool-btn.drawing-btn:hover {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.08);
    color: #ffc107;
}

.tool-btn.drawing-btn.active {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    border-color: #ffc107;
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.tool-btn.clear-btn:hover {
    border-color: #ef5350;
    background: rgba(239, 83, 80, 0.08);
    color: #ef5350;
}

/* Quantitative Data Section */
.quant-data-section {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
}

.section-title {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.data-tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
}

.data-table-card {
    background: var(--chart-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.2s;
}

.data-table-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.table-card-header {
    background: var(--stats-bg);
    color: var(--chart-text);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.table-container {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
    color: var(--chart-text);
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.table-container th {
    background: var(--stats-bg);
    color: var(--chart-text);
    padding: 8px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    border-bottom: 2px solid var(--border-color);
}

.table-container td {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    color: var(--chart-text);
}

.table-container tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.value-positive {
    color: #26a69a;
    font-weight: 500;
}

.value-negative {
    color: #ef5350;
    font-weight: 500;
}

.value-neutral {
    color: var(--text-secondary);
}

/* Chart wrapper with asset list panel */
.chart-wrapper {
    display: flex;
    gap: 12px;
    position: relative;
    width: 100%;
}

.chart-plot {
    flex: 1;
    min-width: 0; /* Allow flex item to shrink below content size */
    height: 600px;
    background: var(--chart-bg-inner);
    border-radius: 4px;
}

/* Asset List Panel */
.asset-list-panel {
    width: 200px;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    max-height: 600px;
    overflow-y: auto;
    flex-shrink: 0;
}

.asset-list-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.asset-list-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.asset-list-loading {
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
    font-size: 12px;
}

.asset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: var(--input-bg);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.asset-item:hover {
    background: var(--chart-bg);
    border-color: var(--border-color);
    transform: translateX(-2px);
}

.asset-item.active {
    background: var(--chart-bg);
    border-color: #26a69a;
    box-shadow: 0 0 8px rgba(38, 166, 154, 0.3);
}

.asset-symbol {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.asset-price {
    font-size: 13px;
    font-weight: 700;
    animation: assetPriceBreathe 3s ease-in-out infinite;
    white-space: nowrap;
    color: var(--text-primary); /* White color for all asset prices */
}

.asset-price.price-up {
    color: #26a69a;
}

.asset-price.price-down {
    color: #ef5350;
}

@keyframes assetPriceBreathe {
    0%, 100% { 
        opacity: 0.85; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.02);
    }
}

/* Caloogy AI Main Section */
.caloogy-ai-main-section {
    margin: 30px 0;
    padding: 30px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    border: 1px solid var(--border-color);
}

.caloogy-ai-title {
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 25px 0;
    text-align: center;
}

.caloogy-ai-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.caloogy-ai-input-wrapper {
    position: relative;
}

.caloogy-ai-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #2a2a2a;
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid #3a3a3a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.caloogy-ai-input-container:focus-within {
    border-color: #26a69a;
    box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.1);
}

.caloogy-ai-main-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 16px;
    padding: 0;
    margin: 0;
    width: 100%;
}

.caloogy-ai-main-input::placeholder {
    color: transparent;
}

.caloogy-ai-suggestions {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #888888;
    font-size: 16px;
    pointer-events: none;
    transition: opacity 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 60px);
}

.caloogy-ai-send-btn {
    background: #26a69a;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: background-color 0.2s, transform 0.1s;
    flex-shrink: 0;
    margin-left: 12px;
}

.caloogy-ai-send-btn:hover {
    background: #2bb5a8;
}

.caloogy-ai-send-btn:active {
    transform: scale(0.95);
}

.caloogy-ai-send-btn:disabled {
    background: #555555;
    cursor: not-allowed;
    opacity: 0.6;
}

.caloogy-ai-response {
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.caloogy-ai-message {
    padding: 12px 16px;
    border-radius: 8px;
    animation: fadeIn 0.3s ease-in;
}

.caloogy-ai-message.user-message {
    background: rgba(38, 166, 154, 0.1);
    border-left: 3px solid #26a69a;
    align-self: flex-end;
    max-width: 80%;
}

.caloogy-ai-message.ai-message {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #666666;
    align-self: flex-start;
    max-width: 90%;
}

.caloogy-ai-message-content {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}

.caloogy-ai-message-content strong {
    color: #ffffff;
    font-weight: 600;
}

.caloogy-ai-loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
}

.caloogy-ai-loading-dots span {
    width: 6px;
    height: 6px;
    background: #26a69a;
    border-radius: 50%;
    animation: loadingDot 1.4s infinite ease-in-out;
}

.caloogy-ai-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.caloogy-ai-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingDot {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.expander {
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px var(--shadow);
}

.expander-header {
    padding: 12px 16px;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.expander-body {
    display: none;
    padding: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    border: 1px solid var(--border-color);
    padding: 6px;
    text-align: center;
    color: var(--text-primary);
}

th {
    background: var(--bg-primary);
    font-weight: 600;
}

/* Stats below chart - hidden on desktop */
.stats-below-chart {
    display: none;
}

/* Tablet responsive design (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    body {
        margin: 30px;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .chart-plot {
        height: 550px;
    }
    
    .chart-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .asset-list-panel {
        width: 100%;
        max-height: 400px;
    }
    
    /* Stats layout for tablet: show only Current Price and Last Update above chart */
    .stats-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* Hide other stats above chart, show them below */
    .stats-container .stat-card:nth-child(3),
    .stats-container .stat-card:nth-child(4),
    .stats-container .stat-card:nth-child(5) {
        display: none;
    }
    
    /* Show stats below chart */
    .stats-below-chart {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 15px;
    }
    
    .stats-below-chart .stat-card {
        display: block !important;
    }
    
    .caloogy-footer {
        padding: 120px 40px 0;
        min-height: 450px;
    }
    
    .footer-brand {
        font-size: clamp(120px, 15vw, 180px);
    }
}

/* Mobile responsive design */
@media (max-width: 768px) {
    body {
        margin: 20px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .chart-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        width: 100%;
    }
    
    .control-group select {
        width: 100%;
    }
    
    .chart-plot {
        height: 400px;
    }
    
    .chart-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .asset-list-panel {
        width: 100%;
        max-height: 400px;
        order: 2; /* Place after chart */
    }
    
    .chart-plot {
        order: 1; /* Place before asset list */
    }
    
    /* Stats layout for mobile: show only Current Price and Last Update above chart */
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Hide other stats above chart */
    .stats-container .stat-card:nth-child(3),
    .stats-container .stat-card:nth-child(4),
    .stats-container .stat-card:nth-child(5) {
        display: none;
    }
    
    /* Show stats below chart */
    .stats-below-chart {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 15px;
    }
    
    .stats-below-chart .stat-card {
        display: block !important;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-time {
        font-size: 20px !important;
    }
    
    h1 {
        font-size: 24px;
        margin: 20px 0;
    }
    
    .chart-container {
        padding: 15px;
        margin: 10px 0;
    }
    
    .caloogy-ai-main-section {
        margin: 20px 0;
        padding: 20px;
    }
    
    .caloogy-ai-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .caloogy-ai-response {
        max-height: 300px;
    }
    
    .tools-panel {
        padding: 15px;
    }
    
    .caloogy-footer {
        margin-top: 40px;
    }
    
    .footer-brand {
        font-size: 60px;
    }
}

/* Current Price Styling with Continuous Breathing Animation */
.stat-price {
    font-size: 40px !important;
    font-weight: 820;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    animation: priceBreathe 2s ease-in-out infinite;
}

.stat-price.price-up {
    color: #26a69a !important;
}

.stat-price.price-down {
    color: #ef5350 !important;
}

/* Continuous breathing effect for price */
@keyframes priceBreathe {
    0%, 100% { 
        opacity: 0.85; 
        transform: scale(1);
        filter: brightness(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.02);
        filter: brightness(1.15);
    }
}

/* Flash animation when price changes */
.stat-price.price-updating {
    animation: priceFlash 0.6s ease, priceBreathe 3s ease-in-out infinite !important;
}

@keyframes priceFlash {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Last Update Time Styling with Continuous Breathing Animation */
.stat-time {
    font-size: 30px !important;
    font-weight: 740;
    letter-spacing: 0.5px;
    color: #ffc107 !important;
    animation: timeBreathe 2s ease-in-out infinite;
}

/* Continuous breathing effect for time */
@keyframes timeBreathe {
    0%, 100% { 
        opacity: 0.85; 
        text-shadow: 0 0 4px rgba(255, 193, 7, 0.3);
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        text-shadow: 0 0 12px rgba(255, 193, 7, 0.7);
        transform: scale(1.02);
    }
}

/* Update animation when time changes */
.stat-time.updating {
    animation: timeUpdate 0.6s ease, timeBreathe 2.5s ease-in-out infinite !important;
}

@keyframes timeUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.update-date {
    font-size: 12px;
    color: #888;
    font-weight: 400;
}

/* CALOOGY Footer - High Contrast White/Black */
.caloogy-footer {
    border-radius: 5%; /* Reduced to 5% */
    background: #ffffff;
    color: #000000;
    padding: 100px 40px 0; /* Reduced padding, bottom padding 0 */
    margin: 120px 0 0 0;
    text-align: center;
    border-top: 3px solid #000000;
    width: 100%;
    box-sizing: border-box;
    min-height: 500px; /* Reduced height */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Push content to bottom */
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100%;
}

.footer-brand {
    font-size: 200px;
    font-weight: 110;
    letter-spacing: 1px;
    margin: 0;
    line-height: 0.98;
    font-family: 'Playfair Display', 'Cormorant Garamond', 'Bodoni', 'Didot', 'Times New Roman', serif;
    text-transform: uppercase;
    order: 3; /* Place at bottom */
    margin-top: auto; /* Push to bottom */
    padding-bottom: 0;
    text-align: center;
}

.footer-tagline {
    font-size: 18px;
    letter-spacing: 8px;
    margin-bottom: 5px;
    font-weight: 400;
    text-transform: uppercase;
    color: #000000;
    order: 1; /* Place at top */
}

.footer-copyright {
    font-size: 11px;
    letter-spacing: 1px;
    margin-top: 10px;
    font-weight: 300;
    color: #666;
    line-height: 1.6;
    order: 2; /* Place in middle */
}

/* Dark mode footer color inversion */
@media (prefers-color-scheme: dark) {
    .caloogy-footer {
        background: #000000; /* Black background in dark mode */
        color: #ffffff; /* White text in dark mode */
        border-top: 3px solid #000000; /* White border in dark mode */
    }
    
    .footer-brand {
        color: #ffffff; /* White CALOOGY text in dark mode */
    }
    
    .footer-tagline {
        color: #ffffff; /* White tagline text in dark mode */
    }
    
    .footer-copyright {
        color: #cccccc; /* Light gray copyright text in dark mode */
    }
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
    body {
        margin: 0;
        padding: 10px;
        background: var(--bg-primary);
    }
    
    h1 {
        font-size: 20px;
        margin: 15px 0;
    }
    
    .chart-container {
        border-radius: 0;
        box-shadow: none;
        padding: 10px;
        margin: 0 -10px;
        background: var(--chart-bg);
    }
    
    .chart-controls {
        padding: 10px;
    }
    
    .chart-wrapper {
        flex-direction: column;
    }
    
    #chartDiv {
        height: 60vh !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    .asset-list-panel {
        width: 100%;
        max-height: 300px;
        margin-top: 15px;
    }
    
    .asset-list-header {
        font-size: 14px;
    }
    
    .asset-item {
        padding: 8px 10px;
    }
    
    .asset-symbol {
        font-size: 13px;
    }
    
    .asset-price {
        font-size: 14px;
    }
    
    .tools-panel {
        display: none; /* Hide on mobile for cleaner look */
    }
    
    .stat-price {
        font-size: 32px !important;
    }
    
    .stat-time {
        font-size: 24px !important;
    }
    
    .caloogy-footer {
        padding: 60px 20px 0; /* Reduced padding, bottom padding 0 */
        margin: 60px 0 0 0;
        width: 100%;
        background: #ffffff;
        box-sizing: border-box;
        min-height: 350px; /* Reduced height for mobile */
        display: flex;
        flex-direction: column;
        justify-content: flex-end; /* Push content to bottom */
    }
    
    .footer-content {
        min-height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }
    
    .footer-brand {
        font-size: 80px; 
        letter-spacing: 0.01em;
        margin-top: auto; /* Push to bottom */
        padding-bottom: 0;
    }
    
    .footer-tagline {
        font-size: 11px;
        letter-spacing: 3px;
        margin-bottom: 15px;
        margin-top: 0;
    }
    
    .footer-copyright {
        font-size: 9px;
        letter-spacing: 0.5px;
        margin-top: 30px;
    }
    
    /* Dark mode footer color inversion for mobile */
    @media (prefers-color-scheme: dark) {
        .caloogy-footer {
            background: #000000; /* Black background in dark mode */
            color: #ffffff; /* White text in dark mode */
            border-top: 3px solid #000000; /* Black border in dark mode */
        }
        
        .footer-brand {
            color: #ffffff; /* White CALOOGY text in dark mode */
        }
        
        .footer-tagline {
            color: #ffffff; /* White tagline text in dark mode */
        }
        
        .footer-copyright {
            color: #cccccc; /* Light gray copyright text in dark mode */
        }
    }
    
    body {
        margin: 0;
        padding: 10px;
        padding-bottom: 0;
    }
}

/* Gemini Chat Widget */
.gemini-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.gemini-chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f5b616; /* Gold color */
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 182, 22, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    animation: geminiButtonBreathe 2.5s ease-in-out infinite;
}

@keyframes geminiButtonBreathe {
    0%, 100% {
        opacity: 0.85;
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(245, 182, 22, 0.4);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
        box-shadow: 0 8px 24px rgba(245, 182, 22, 0.7);
    }
}

.gemini-chat-button:hover {
    transform: scale(1.15);
    box-shadow: 0 10px 28px rgba(245, 182, 22, 0.8);
    animation: none; /* Disable breathing on hover */
}

.gemini-chat-button:active {
    transform: scale(0.95);
}

.gemini-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 400px;
    height: 600px;
    background: #ffffff; /* Default white background */
    border-radius: 5%; /* 5% border radius */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.gemini-chat-window.dark-mode {
    background: #000000; /* Black background */
    border: 1px solid #333333;
}

.gemini-chat-window.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.gemini-chat-header {
    background: #f5b616; /* Gold color */
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gemini-chat-theme-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
    margin-right: 8px;
}

.gemini-chat-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gemini-chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.gemini-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.gemini-chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gemini-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gemini-chat-message {
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gemini-chat-message.user {
    align-items: flex-end;
}

.gemini-chat-message.assistant {
    align-items: flex-start;
}

.gemini-chat-message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
    line-height: 1.5;
}

.gemini-chat-message.user .gemini-chat-message-bubble {
    background: #f5b616; /* Gold color */
    color: white;
    border-bottom-right-radius: 4px;
}

.gemini-chat-message.assistant .gemini-chat-message-bubble {
    background: #f5f5f5; /* Light gray for white background */
    color: #333333; /* Dark text for readability */
    border-bottom-left-radius: 4px;
    border: 1px solid #e0e0e0;
}

.gemini-chat-message-time {
    font-size: 11px;
    color: #666666; /* Gray text for white background */
    padding: 0 4px;
}

/* Dark mode styles */
.gemini-chat-window.dark-mode .gemini-chat-message.assistant .gemini-chat-message-bubble {
    background: #1a1a1a; /* Dark gray for black background */
    color: #e0e0e0; /* Light text for readability */
    border: 1px solid #333333;
}

.gemini-chat-window.dark-mode .gemini-chat-message-time {
    color: #999999; /* Lighter gray for black background */
}

.gemini-chat-window.dark-mode .gemini-chat-input-container {
    border-top: 1px solid #333333;
    background: #000000;
}

.gemini-chat-window.dark-mode .gemini-chat-input {
    border: 1px solid #333333;
    background: #1a1a1a;
    color: #e0e0e0;
}

.gemini-chat-window.dark-mode .gemini-chat-input:focus {
    border-color: #f5b616; /* Gold border on focus */
    background: #2a2a2a;
}

.gemini-chat-input-container {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    background: #ffffff; /* White background */
}

.gemini-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    background: #f5f5f5; /* Light gray input */
    color: #333333; /* Dark text */
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.gemini-chat-input:focus {
    border-color: #f5b616; /* Gold color */
    background: #ffffff;
}

.gemini-chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f5b616; /* Gold color */
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.gemini-chat-send:hover {
    transform: scale(1.1);
}

.gemini-chat-send:active {
    transform: scale(0.95);
}

.gemini-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Loading indicator */
.gemini-chat-loading {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.gemini-chat-loading span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f5b616; /* Gold color */
    animation: loadingBounce 1.4s infinite ease-in-out;
}

.gemini-chat-loading span:nth-child(1) {
    animation-delay: -0.32s;
}

.gemini-chat-loading span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Tablet responsive (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .gemini-chat-window {
        width: 450px;
        height: 650px;
    }
    
    .gemini-chat-button {
        width: 60px;
        height: 60px;
    }
    
    .caloogy-footer {
        padding: 120px 40px 0;
        min-height: 450px;
    }
    
    .footer-brand {
        font-size: clamp(120px, 15vw, 180px);
    }
    
    /* Dark mode footer color inversion for tablet */
    @media (prefers-color-scheme: dark) {
        .caloogy-footer {
            background: #000000;
            color: #ffffff;
            border-top: 3px solid #000000;
        }
        
        .footer-brand {
            color: #ffffff;
        }
        
        .footer-tagline {
            color: #ffffff;
        }
        
        .footer-copyright {
            color: #cccccc;
        }
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .gemini-chat-widget {
        bottom: 15px;
        right: 15px;
        left: auto; /* Ensure it's positioned from right */
    }
    
    .gemini-chat-window {
        width: 90vw; /* Smaller width - 90% of viewport */
        max-width: 400px; /* Max width limit */
        height: 70vh; /* Smaller height - 70% of viewport */
        max-height: 500px; /* Max height limit */
        bottom: 75px;
        right: 15px;
        left: auto; /* Fix: remove left, use right positioning */
    }
    
    .gemini-chat-button {
        width: 64px; /* Larger button for mobile */
        height: 64px; /* Larger button for mobile */
    }
}

