/* Finsentials Custom Styles - Emerald Wealth Theme */

:root {
    --primary: #059669;
    --primary-hover: #047857;
    --primary-light: #ecfdf5;
    --accent: #f59e0b;
    --accent-light: #fef3c7;
    --bg-light: #f0fdf4;
    --card-border: #d1fae5;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --slider-track: #e2e8f0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 8px;
    background: var(--slider-track);
    outline: none;
    cursor: pointer;
    accent-color: var(--primary);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.4);
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15);
}

input[type="number"], input[type="text"] {
    accent-color: var(--primary);
}

input[type="number"]:focus, input[type="text"]:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1) !important;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Animate number changes */
.number-flash {
    animation: numberFlash 0.3s ease;
}

@keyframes numberFlash {
    0% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* FIRE target line marker */
.fire-target-marker {
    position: absolute;
    left: var(--marker-position, 50%);
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    z-index: 5;
}

.fire-target-marker::before {
    content: 'FIRE ●';
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 800;
    color: var(--accent);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* Result value emphasis */
.stat-value {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.02em;
    overflow-wrap: break-word;
    word-break: break-word;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* Ad container styling */
.ad-container {
    min-height: 250px;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Sticky sidebar */
.sticky-sidebar {
    position: sticky;
    top: 100px;
}

/* Tool card grid */
.tool-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card:hover {
    transform: translateY(-4px);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .stat-value {
        font-size: 1.35rem;
    }
    .hide-mobile {
        display: none;
    }
}

/* Print styles */
@media print {
    header, footer, .ad-container, .sticky-sidebar, .no-print {
        display: none !important;
    }
    body {
        background: white !important;
    }
    .card {
        break-inside: avoid;
        border: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
    }
}

/* Accessibility: focus visible */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Currency selector */
.currency-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}

.currency-option:hover {
    background: #f1f5f9;
}

.currency-option:active {
    background: #e2e8f0;
}

.currency-option span {
    font-size: 1rem;
    min-width: 20px;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
