:root {
    color-scheme: dark;
}

html, body {
    background-color: #121212 !important;
    color: #E0E0E0 !important;
}

/* Base Styles */
body {
    background-color: #121212;
    color: #E0E0E0;
    font-family: 'Roboto', sans-serif;
}

.mono {
    font-family: 'Roboto Mono', monospace;
}

/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.icon-spin {
    animation: spin 1s linear infinite;
}

/* Toast Animations */
.toast {
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease-in-out;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Tab Styles */
.tab-active {
    color: #3A86FF;
    border-bottom: 2px solid #3A86FF;
}

/* Status Styles */
.status-active {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.status-stopped {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

/* Table Row Styles */
.buy-row {
    background-color: rgba(58, 134, 255, 0.05);
}

.sell-row {
    background-color: rgba(231, 76, 60, 0.05);
}

/* Scrollbar Styles */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #1E1E1E;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #3A86FF;
    border-radius: 3px;
}

/* Custom Select */
.custom-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23E0E0E0'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.5em 1.5em;
}

/* Custom Checkbox */
input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #3A86FF;
    border-radius: 3px;
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-color: #3A86FF;
    position: relative;
}

input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    top: 2px;
}

/* Custom Radio */
input[type="radio"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #3A86FF;
    border-radius: 50%;
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

input[type="radio"]:checked {
    border: 1px solid #3A86FF;
    position: relative;
}

input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #3A86FF;
}

/* Custom Switch */
.custom-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.custom-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1E1E1E;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: #E0E0E0;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #3A86FF;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Log Styles */
.log-info {
    border-left: 3px solid #3A86FF;
}

.log-warning {
    border-left: 3px solid #f39c12;
}

.log-error {
    border-left: 3px solid #e74c3c;
}

/* Button Hover Effects */
button:hover {
    transition: all 0.2s ease-in-out;
}

/* Focus Styles */
button:focus,
select:focus,
input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(58, 134, 255, 0.3);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Table */
@media (max-width: 768px) {
    .custom-scrollbar {
        overflow-x: auto;
    }
    
    table {
        font-size: 14px;
    }
    
    .p-4 {
        padding: 0.75rem;
    }
}

/* Chart Container */
.chart-container {
    position: relative;
    width: 100%;
    height: 400px;
}

/* Utility Classes */
.text-shadow {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.backdrop-blur {
    backdrop-filter: blur(4px);
}

/* Dark Theme Overrides */
.bg-dark {
    background-color: #0D1117;
}

.border-dark {
    border-color: #21262D;
}

.text-muted {
    color: #8B949E;
}

/* Custom Scrollbar for Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #3A86FF #1E1E1E;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-secondary,
    .bg-[#1A1A1A],
    .bg-[#121212] {
        background: white !important;
        border: 1px solid #ccc !important;
    }
}