/* Custom Styles for Personal Finances Website */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Calculator Styles */
.calculator-container {
    max-width: 600px;
    margin: 0 auto;
}

.calculator-result {
    background: linear-gradient(135deg, hsl(var(--p)) 0%, hsl(var(--s)) 100%);
    border-radius: var(--rounded-box);
    padding: 2rem;
    color: hsl(var(--pc));
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.hidden {
    display: none;
}

/* Ad Container Styling */
.ad-container {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: hsl(var(--b2));
    border-radius: var(--rounded-box);
    margin: 1rem 0;
}

/* Form Styling */
input[type="number"],
input[type="range"] {
    transition: all 0.2s ease;
}

input[type="number"]:focus,
input[type="range"]:focus {
    transform: scale(1.02);
}

/* Article Content */
.article-content h2 {
    font-size: 1.75rem;
    font-weight: bold;
    margin: 2rem 0 1rem;
    color: hsl(var(--p));
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 1.5rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Print Styles */
@media print {
    .navbar,
    .ad-container,
    footer {
        display: none !important;
    }
    
    .calculator-result {
        border: 2px solid #000;
        page-break-inside: avoid;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: hsl(var(--b2));
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--p));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--pf));
}

/* Loading Spinner */
.loading-spinner {
    border: 4px solid hsl(var(--b3));
    border-top: 4px solid hsl(var(--p));
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Responsive Typography */
@media (max-width: 640px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .calculator-container {
        padding: 0 1rem;
    }
}

/* Dark Mode Adjustments */
[data-theme="dark"] .calculator-result {
    background: linear-gradient(135deg, hsl(var(--p)) 0%, hsl(var(--s)) 100%);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid hsl(var(--p));
    outline-offset: 2px;
}