/* 
   RatChart Premium Stylesheet 
   Theme: Dark Glassmorphism 
*/

:root {
    --bg-dark: #0a0a0f;
    --bg-panel: rgba(25, 25, 35, 0.65);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f0f5;
    --text-muted: #8e8e9e;

    --brand-primary: #ff9f43;
    --brand-secondary: #ff6b6b;
    --brand-accent: #feca57;

    --glass-blur: blur(12px);
    --transition-speed: 0.3s;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 159, 67, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 107, 107, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Typography */
.gradient-text {
    background: linear-gradient(45deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navbar */
.glass-nav {
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--panel-border);
    padding: 0.75rem 0;
}

.logo-circle {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 0 10px rgba(255, 159, 67, 0.2);
}

.premium-badge {
    background: linear-gradient(45deg, rgba(255, 159, 67, 0.2), rgba(255, 107, 107, 0.2));
    color: var(--brand-primary);
    border: 1px solid rgba(255, 159, 67, 0.3);
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    padding: 0.4em 0.8em;
}

/* Glass Panels */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.glass-panel:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.glass-divider {
    border-color: var(--panel-border);
    opacity: 1;
    margin: 1.5rem 0;
}

/* Form Controls Customization */
.control-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.custom-input,
.custom-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.custom-input:focus,
.custom-select:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.25rem rgba(255, 159, 67, 0.15);
    color: var(--text-primary);
}

.custom-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238e8e9e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.custom-select option {
    background-color: #1a1a24;
    color: var(--text-primary);
}

.custom-color-picker {
    padding: 0.25rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    height: 40px;
    cursor: pointer;
}

/* Custom Radio Buttons */
.custom-radio-btn {
    border-color: var(--panel-border);
    color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    font-size: 0.85rem;
    padding: 0.4rem 0.2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-radio-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-check:checked+.custom-radio-btn {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: white;
    box-shadow: 0 0 10px rgba(255, 159, 67, 0.3);
}

/* Switch styling */
.custom-switch .form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.custom-switch .form-check-input:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.custom-switch .form-check-label {
    cursor: pointer;
    font-size: 0.9rem;
    padding-top: 2px;
}

.custom-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 159, 67, 0.25);
}

/* Range Slider */
.custom-range::-webkit-slider-thumb {
    background: var(--brand-primary);
}

.custom-range::-webkit-slider-runnable-track {
    background: rgba(255, 255, 255, 0.1);
}

/* Buttons */
.premium-btn {
    background: linear-gradient(45deg, var(--brand-primary), var(--brand-secondary));
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    padding: 0.4rem 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 159, 67, 0.3);
}

.premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 159, 67, 0.4);
    color: white;
}

.premium-btn:active {
    transform: translateY(0);
}

/* Code Panel */
.code-panel {
    background-color: #0d0d14;
}

.code-header {
    background-color: rgba(255, 255, 255, 0.03);
}

.code-body pre {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
}

.code-body pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.code-body pre::-webkit-scrollbar-track {
    background: #0d0d14;
}

.code-body pre::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.code-body pre::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Utilities */
.sidebar-scroll {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background-color: #333;
    border-radius: 3px;
}

/* Responsive adjustment */
@media (max-width: 991px) {
    .h-100 {
        height: auto !important;
    }
}