* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 20px;
}

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

/* Navigation */
.navigation {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-link {
    padding: 10px 20px;
    text-decoration: none;
    color: #4a5568;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-link:hover {
    background: #f0fdf4;
    color: #22c55e;
}

.nav-link.active {
    background: #22c55e;
    color: white;
}

header {
    text-align: center;
    color: #2d3748;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #22c55e;
}

.subtitle {
    font-size: 1.2rem;
    color: #718096;
}

.main-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Education Card */
.education-card {
    background: #f0fdf4;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #bbf7d0;
}

.education-card h2 {
    color: #2d3748;
    margin-bottom: 15px;
}

.explanation {
    color: #4a5568;
    line-height: 1.6;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.fun-fact {
    background: white;
    border-left: 4px solid #22c55e;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}


/* Calculator Section */
.calculator-section {
    margin-top: 30px;
}

.calculator-section h2 {
    color: #2d3748;
    margin-bottom: 20px;
}

/* Scenarios Bar */
.scenarios-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.scenario-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.scenario-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.4);
    background: #16a34a;
}

/* Calculator Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

/* Input Section */
.input-section {
    background: #f7fafc;
    padding: 25px;
    border-radius: 15px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 10px;
}

.tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    cursor: help;
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 0.9rem;
    z-index: 10;
    max-width: 250px;
    white-space: normal;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 10px;
}

.input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    color: #2d3748;
}

.currency, .percent, .time-unit {
    color: #718096;
    font-weight: 600;
}

.slider {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #cbd5e0;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #22c55e;
    cursor: pointer;
}

.calculate-btn {
    width: 100%;
    padding: 15px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.4);
    background: #16a34a;
}

/* Results Section */
.results-section {
    padding: 25px;
}

.result-card {
    background: #22c55e;
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.result-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    opacity: 0.95;
}

.amount {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.breakdown {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 10px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 1rem;
}

.breakdown-item.profit {
    font-weight: 600;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

/* Comparisons */
.comparisons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.comparison-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}


.comparison-text {
    color: #2d3748;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Cost of Waiting */
.cost-of-waiting {
    background: #fff5f5;
    border: 2px solid #fc8181;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.cost-of-waiting h4 {
    color: #c53030;
    margin-bottom: 10px;
}

.cost-of-waiting #lost-amount {
    color: #c53030;
    font-weight: 700;
    font-size: 1.2rem;
}

.motivation {
    color: #742a2a;
    font-style: italic;
    margin-top: 10px;
}

/* Chart Section */
.chart-section {
    background: #f7fafc;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.chart-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
}

/* Tips Section */
.tips-section {
    margin-top: 40px;
}

.tips-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tip-card {
    background: #f0fdf4;
    color: #166534;
    border: 2px solid #22c55e;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}


.tip-card h4 {
    margin-bottom: 10px;
}

.tip-card p {
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Rule of 72 Section */
.rule-72-section {
    background: #22c55e;
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-top: 30px;
}

.rule-72-section h3 {
    margin-bottom: 10px;
}

.rule-72-section p {
    margin-bottom: 20px;
    opacity: 0.95;
}

.rule-72-calc {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 10px;
}

.rule-72-calc input {
    width: 100px;
    padding: 8px;
    border: 2px solid white;
    border-radius: 8px;
    background: transparent;
    color: white;
    font-size: 1.1rem;
    text-align: center;
}

.rule-72-calc input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#rule72-result {
    font-weight: 700;
    font-size: 1.3rem;
}