/* ==================== ROTH IRA CALCULATOR - COMPLETE STYLES ==================== */
/* These styles match the exact HTML structure and follow your design pattern */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ==================== MAIN CONTAINER ==================== */
.roth-ira-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.roth-ira-wrapper {
    max-width: 950px;
    margin: 0 auto;
}

/* ==================== HEADER SECTION ==================== */
.roth-ira-title {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.roth-ira-icon {
    font-size: 2.8rem;
    display: inline-block;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    75% { transform: scale(0.95); }
}

.roth-ira-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-family: 'Poppins', sans-serif;
}

/* ==================== MAIN CARD ==================== */
.roth-ira-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* ==================== INPUT GROUP ==================== */
.roth-ira-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Input Cards */
.roth-input-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 1.2rem;
    border: 1px solid var(--border);
}

.roth-input-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 0.9rem;
}

.roth-input-field {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
}

.roth-input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.roth-input-help {
    display: block;
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

/* ==================== RANGE SLIDER ==================== */
.roth-range-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.3rem;
}

.roth-range-input {
    flex: 1;
    accent-color: var(--primary);
    cursor: pointer;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 4px;
}

.roth-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}

.roth-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.roth-range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
}

.roth-range-value {
    font-weight: 600;
    color: var(--primary);
    min-width: 50px;
    text-align: right;
    font-size: 1rem;
}

/* ==================== BUTTON STYLES ==================== */
.roth-primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.roth-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.roth-action-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.roth-action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.roth-ira-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

/* ==================== RESULTS SECTION ==================== */
.roth-ira-results {
    background: var(--bg);
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.roth-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.roth-result-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

/* Main Display */
.roth-main-display {
    background: linear-gradient(135deg, var(--primary), #818cf8);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: white;
}

.roth-main-display > div {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Results Grid */
.roth-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.roth-result-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 0.8rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.roth-result-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.1);
}

.roth-result-card.highlight {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.roth-result-card.highlight .roth-result-label-small {
    color: rgba(255, 255, 255, 0.8);
}

.roth-result-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.roth-result-card.highlight .roth-result-value {
    color: white;
}

.roth-result-label-small {
    font-size: 0.7rem;
    color: var(--text-light);
}

/* ==================== TAX-FREE NOTE ==================== */
.roth-tax-free-note {
    margin-top: 1rem;
    padding: 0.8rem;
    background: var(--surface);
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.roth-tax-free-note .small {
    margin: 0;
    color: var(--text-light);
}

.roth-tax-free-note strong {
    color: var(--primary);
}

/* ==================== CHART CONTAINER ==================== */
.roth-chart-container {
    display: none;
    background: var(--surface);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.roth-chart-container canvas {
    max-height: 300px;
    width: 100% !important;
}

/* ==================== ADDITIONAL INFO ==================== */
.roth-additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.roth-info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem;
    background: var(--surface);
    border-radius: 10px;
    align-items: center;
}

.roth-info-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

.roth-info-value {
    font-weight: 600;
    color: var(--primary);
}

/* ==================== REFERENCE SECTION ==================== */
.roth-ira-reference {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.roth-ira-reference h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text);
}

.roth-reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.roth-ref-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 1.2rem;
    border: 1px solid var(--border);
}

.roth-ref-card h4 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.roth-ref-card ul {
    list-style: none;
    padding: 0;
}

.roth-ref-card ul li {
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
}

.roth-ref-card ul li:last-child {
    border-bottom: none;
}

.roth-ref-card ul li strong {
    color: var(--text);
}

/* ==================== FOOTER NOTE ==================== */
.roth-footer-note {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
}

.roth-footer-note p {
    margin: 0.3rem 0;
}

/* ==================== RELATED TOOLS ==================== */
.roth-related-tools {
    max-width: 950px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.roth-related-tools h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.roth-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.roth-related-category h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.roth-related-category ul {
    list-style: none;
    padding: 0;
}

.roth-related-category ul li {
    padding: 0.3rem 0;
}

.roth-related-category ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.roth-related-category ul li a:hover {
    color: var(--primary);
}

.roth-related-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ==================== SEO CONTENT STYLES ==================== */
.seo-content-area {
    max-width: 950px;
    margin: 40px auto;
    padding: 2rem;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    background: var(--surface);
    border-radius: var(--radius);
}

.seo-content-area h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

.seo-content-area h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 30px 0 15px 0;
    color: var(--text);
    border-left: 4px solid var(--primary);
    padding-left: 15px;
}

.seo-content-area h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 10px 0;
    color: var(--primary);
}

.seo-content-area p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--text-light);
}

.seo-content-area .feature-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.seo-content-area .feature-list li {
    padding: 12px 0 12px 28px;
    position: relative;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
}

.seo-content-area .feature-list li:last-child {
    border-bottom: none;
}

.seo-content-area .feature-list li:before {
    content: "✓";
    color: var(--primary);
    font-weight: 700;
    position: absolute;
    left: 0;
    top: 12px;
}

.seo-content-area ol {
    margin: 20px 0;
    padding-left: 25px;
}

.seo-content-area ol li {
    margin: 12px 0;
    line-height: 1.6;
    color: var(--text-light);
}

.seo-content-area ul {
    margin: 20px 0;
    padding-left: 25px;
}

.seo-content-area ul li {
    margin: 10px 0;
    line-height: 1.6;
    color: var(--text-light);
}

.seo-content-area strong {
    color: var(--primary);
    font-weight: 600;
}

.seo-content-area a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px dashed var(--primary);
}

.seo-content-area a:hover {
    color: #818cf8;
    border-bottom-color: #818cf8;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 968px) {
    .roth-ira-input-group {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .roth-ira-container {
        padding: 0 1rem;
    }
    
    .roth-ira-title {
        font-size: 2rem;
    }
    
    .roth-ira-icon {
        font-size: 1.8rem;
    }
    
    .roth-ira-card {
        padding: 1.2rem;
    }
    
    .roth-ira-input-group {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .roth-input-card {
        padding: 1rem;
    }
    
    .roth-result-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    
    .roth-ira-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .roth-primary-btn,
    .roth-action-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .roth-reference-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .roth-related-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .roth-main-display > div {
        font-size: 1rem;
    }
    
    .seo-content-area {
        padding: 1.5rem;
    }
    
    .seo-content-area h2 {
        font-size: 24px;
    }
    
    .seo-content-area h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .roth-ira-title {
        font-size: 1.5rem;
    }
    
    .roth-result-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .roth-result-value {
        font-size: 1rem;
    }
    
    .roth-range-wrapper {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .roth-range-value {
        min-width: 40px;
        font-size: 0.8rem;
    }
    
    .roth-additional-info {
        grid-template-columns: 1fr;
    }
    
    .roth-info-row {
        flex-direction: column;
        text-align: center;
        gap: 0.3rem;
    }
    
    .seo-content-area {
        padding: 1rem;
    }
    
    .seo-content-area h2 {
        font-size: 20px;
    }
    
    .seo-content-area h3 {
        font-size: 18px;
    }
    
    .seo-content-area .feature-list li {
        font-size: 14px;
        padding: 10px 0 10px 25px;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.roth-ira-results {
    animation: fadeIn 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .roth-ira-container {
        margin: 0;
        padding: 0;
    }
    
    .roth-primary-btn,
    .roth-action-btn {
        display: none;
    }
    
    .roth-ira-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .roth-input-field {
        border: 1px solid #ddd;
        background: white;
        color: black;
    }
    
    .roth-range-input {
        display: none;
    }
    
    .roth-chart-container {
        display: block !important;
    }
    
    .roth-ira-title {
        font-size: 24px;
    }
    
    .roth-result-card {
        border: 1px solid #ddd;
    }
    
    .roth-result-card.highlight {
        background: #f0f0f0;
        color: #000;
    }
    
    .roth-result-card.highlight .roth-result-value {
        color: #000;
    }
    
    .roth-result-card.highlight .roth-result-label-small {
        color: #666;
    }
}

/* ==================== ACCESSIBILITY ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.roth-input-field:focus-visible,
.roth-range-input:focus-visible,
.roth-primary-btn:focus-visible,
.roth-action-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ==================== SCROLLBAR STYLING ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}