/* Tailwind base + custom dark theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0c0f;
    color: #e5e7eb;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth transitions */
a, button, input, textarea, select {
    transition: all 0.2s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1d24;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #2a2f38;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3f48;
}

/* Range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"]:focus {
    outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
    background: #1a1d24;
    height: 4px;
    border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -8px;
    background-color: #ffffff;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background-color: #e5e7eb;
    transform: scale(1.1);
}

input[type="range"]::-moz-range-track {
    background: #1a1d24;
    height: 4px;
    border-radius: 4px;
}

input[type="range"]::-moz-range-thumb {
    background-color: #ffffff;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* Card hover effects */
.hover-card {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.hover-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Input focus styles */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Button active state */
button:active {
    transform: scale(0.98);
}

/* Loading spinner */
.spinner {
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Chart container */
.chart-container {
    position: relative;
    margin: auto;
    height: 250px;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chart-container {
        height: 200px;
    }
}

/* Toast animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast {
    animation: fadeInUp 0.3s ease;
}

/* Custom toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2a2f38;
    transition: 0.3s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #ffffff;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background-color: #0a0c0f;
}