/* Compound Interest Calculator - Complete Styles */

.compound-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.compound-wrapper {
    max-width: 950px;
    margin: 0 auto;
}

.compound-title {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.compound-icon {
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.compound-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.compound-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.compound-input-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 1.2rem;
    border: 1px solid var(--border);
}

.input-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text);
}

.required {
    color: #ef4444;
}

.amount-input-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 1rem;
}

.currency-symbol {
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
}

.number-input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    outline: none;
}

.dual-input-row {
    display: flex;
    gap: 1rem;
}

.dual-input-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 1rem;
}

.select-input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
}

.select-input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-unit {
    font-size: 0.8rem;
    color: var(--text-light);
}

.input-hint {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.4rem;
}

.compound-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.primary-action-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;
}

.primary-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(230, 126, 34, 0.3);
}

.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;
}

.action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.compound-results {
    background: var(--bg);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.result-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.age-main-display {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 24px;
    color: white;
}

.compound-main-display {
    background: linear-gradient(135deg, var(--primary), #2c3e2f);
}

.age-big-number {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.big-number {
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
}

.big-label {
    font-size: 1rem;
    font-weight: 500;
}

.age-detail-row {
    margin-top: 0.5rem;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.detail-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffd700;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border);
}

.result-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    word-break: break-word;
}

.result-label-small {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

/* Chart Container */
.chart-container {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
}

/* Breakdown Section */
.breakdown-section {
    margin: 1.5rem 0;
}

.breakdown-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.table-wrapper {
    overflow-x: auto;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.breakdown-table th,
.breakdown-table td {
    padding: 0.6rem 0.4rem;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

.breakdown-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    text-align: center;
}

.breakdown-table td {
    color: var(--text);
}

.breakdown-table tr:hover td {
    background: rgba(230, 126, 34, 0.05);
}

/* Additional Info */
.additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem;
    background: var(--surface);
    border-radius: 10px;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

.info-value {
    font-weight: 600;
    color: var(--primary);
}

/* Insight Box */
.insight-box {
    background: linear-gradient(135deg, #fef3e8, #ffe8d6);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-left: 4px solid var(--primary);
    margin-top: 1rem;
}

.dark-mode .insight-box {
    background: linear-gradient(135deg, #2d2d44, #1e1e2e);
}

.insight-icon {
    font-size: 1.5rem;
}

.insight-box strong {
    color: var(--primary);
}

.insight-box span:last-child {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--bg);
}

/* Reference Section */
.compound-reference {
    margin-bottom: 1.5rem;
}

.compound-reference h3 {
    margin-bottom: 1rem;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.ref-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.ref-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.ref-card p, .ref-card ul {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
}

.ref-card ul {
    padding-left: 1.2rem;
}

.ref-card li {
    margin-bottom: 0.2rem;
}

/* ============================================ */
/* MODAL STYLES - CRITICAL: Modal hidden by default */
/* ============================================ */

.giftcard-modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.giftcard-modal.active {
    display: flex !important;
}

.giftcard-modal-content {
    background: var(--surface);
    border-radius: 32px;
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.giftcard-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.giftcard-modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.giftcard-modal-close {
    font-size: 1.8rem;
    font-weight: 300;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
    line-height: 1;
}

.giftcard-modal-close:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.giftcard-modal-body {
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.giftcard-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Compound Gift Card */
.compound-giftcard {
    background: linear-gradient(135deg, #1e3c32, #2c3e2f);
    border-radius: 28px;
    padding: 2rem;
    max-width: 450px;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.compound-giftcard-bg {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.compound-giftcard-content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
}

.compound-giftcard-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.compound-giftcard-icon {
    font-size: 2.5rem;
}

.compound-giftcard-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.compound-giftcard-future,
.compound-giftcard-interest {
    margin: 0.8rem 0;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.compound-giftcard-label {
    display: block;
    font-size: 0.7rem;
    opacity: 0.8;
    margin-bottom: 0.2rem;
}

.compound-giftcard-value {
    font-size: 1.2rem;
    font-weight: 700;
}

.compound-giftcard-period {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.compound-giftcard-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.compound-giftcard-message {
    font-size: 0.8rem;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.compound-giftcard-brand {
    font-size: 0.65rem;
    opacity: 0.7;
}

/* SEO Content Area */
.seo-content-area {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.last-updated {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.toc {
    background: var(--bg);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    margin: 1rem 0;
    list-style: none;
}

.toc li {
    margin-bottom: 0.3rem;
}

.toc a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
}

.toc a:hover {
    text-decoration: underline;
}

.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.related-article-cta {
    margin: 1.5rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .compound-container {
        padding: 0 1rem;
    }
    
    .compound-title {
        font-size: 1.8rem;
    }
    
    .compound-card {
        padding: 1.2rem;
    }
    
    .compound-input-group {
        grid-template-columns: 1fr;
    }
    
    .dual-input-row {
        flex-direction: column;
    }
    
    .breakdown-table {
        font-size: 0.65rem;
    }
    
    .breakdown-table th,
    .breakdown-table td {
        padding: 0.4rem 0.2rem;
    }
    
    .result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .giftcard-modal-body {
        padding: 1rem;
    }
    
    .compound-giftcard {
        padding: 1rem;
    }
    
    .giftcard-modal-header,
    .giftcard-modal-footer {
        padding: 1rem;
    }
}