/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #1e293b;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--dark-bg);
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow-lg);
}

.header-content {
    text-align: center;
}

.logo {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: white;
}

.logo i {
    color: var(--primary-light);
    margin-right: 10px;
}

.tagline {
    font-size: 1.1rem;
    color: var(--primary-light);
    font-weight: 300;
}

/* Calculator Section */
.calculator-section {
    padding: 3rem 0;
}

.calculator-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Input Group */
.input-group {
    margin-bottom: 2rem;
}

.input-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.input-label i {
    color: var(--success-color);
    margin-right: 8px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-field {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    outline: none;
}

.input-suffix {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Slider */
.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    outline: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.slider:hover {
    opacity: 1;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* Lump Sum Section */
.lump-sum-section {
    background: linear-gradient(135deg, #f6f8fb 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.subsection-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.subsection-title i {
    color: var(--warning-color);
    margin-right: 8px;
}

.lump-sum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.lump-sum-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lump-sum-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.lump-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.lump-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.3s ease;
}

.lump-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.lump-month {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

.calculate-btn i {
    margin-right: 10px;
}

/* Results Section */
.results-section {
    padding: 3rem 0;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.metric-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.metric-card.highlight {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--light-bg);
    color: var(--primary-color);
}

.metric-card.highlight .metric-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.metric-card.highlight .metric-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Achievement Section */
.achievement-section {
    margin-bottom: 2rem;
    animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.achievement-card {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.achievement-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: rotate 2s ease-in-out infinite;
}

@keyframes rotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(20deg);
    }
}

.achievement-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.achievement-text {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Timeline Card */
.timeline-card,
.progress-tracking,
.comparison-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.card-title i {
    color: var(--primary-color);
    margin-right: 10px;
}

/* Timeline Items */
.timeline-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 10px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(10px);
}

.timeline-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-agency {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-amount {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.timeline-date {
    margin-left: auto;
    text-align: right;
}

.timeline-month {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.timeline-year {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Progress Bars */
.progress-item {
    margin-bottom: 2rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-label {
    font-weight: 600;
    font-size: 1.1rem;
}

.progress-percentage {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: var(--light-bg);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 15px;
    transition: width 1s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.comparison-table thead {
    background: var(--dark-bg);
    color: white;
}

.comparison-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table tbody tr:hover {
    background: var(--light-bg);
}

.positive {
    color: var(--success-color);
    font-weight: 600;
}

.negative {
    color: var(--danger-color);
    font-weight: 600;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pdf-btn,
.reset-btn {
    flex: 1;
    min-width: 200px;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pdf-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.pdf-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.reset-btn {
    background: var(--light-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.reset-btn:hover {
    background: var(--border-color);
}

/* Details Section */
.details-section {
    padding: 3rem 0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-5px);
}

.detail-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.detail-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--danger-color);
    margin-bottom: 0.5rem;
}

.detail-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.detail-status.pending {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.detail-status.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.total-box {
    background: var(--dark-bg);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.total-box h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.total-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--warning-color);
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.disclaimer {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .calculator-card {
        padding: 1.5rem;
    }

    .lump-sum-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .pdf-btn,
    .reset-btn {
        width: 100%;
    }

    .timeline-item {
        flex-direction: column;
        text-align: center;
    }

    .timeline-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .timeline-date {
        margin-left: 0;
        margin-top: 1rem;
    }
}
