:root {
    --primary-color: #4a90e2;
    --secondary-color: #5cb85c;
    --accent-color: #ffa500;
    --text-dark: #333333;
    --text-light: #666666;
    --background: #f8f9fa;
    --white: #ffffff;
    --border: #dee2e6;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--background);
}

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

header {
    background: var(--white);
    padding: 0.5rem 0;
    text-align: center;
    border-bottom: 2px solid var(--border);
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--background);
}

.nav-link.active {
    color: var(--primary-color);
    background: var(--background);
}

header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.0rem;
}

header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.calculator-section {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.calculator-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
    overflow: hidden;
}

.controls-panel {
    padding: 2rem;
    background: var(--background);
    border-right: 1px solid var(--border);
}

.controls-panel h2 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.intro {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.75rem;
}

.label-main {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.label-help {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider-container input[type="range"] {
    flex: 1;
}

.value-display {
    min-width: 80px;
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.input-with-buttons {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.input-with-buttons:focus-within {
    border-color: var(--primary-color);
}

.input-with-buttons input[type="number"] {
    width: 80px;
    padding: 0.6rem 0.25rem;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
    text-align: center;
    background: transparent;
    outline: none;
}

.input-with-buttons input[type="number"]::-webkit-inner-spin-button,
.input-with-buttons input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-increment,
.btn-decrement {
    width: 32px;
    height: 38px;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.btn-increment:hover,
.btn-decrement:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-increment:active,
.btn-decrement:active {
    transform: scale(0.95);
}

.input-label {
    padding: 0 0.75rem;
    font-size: 1rem;
    color: var(--text-light);
    background: var(--background);
    border-left: 1px solid var(--border);
    height: 38px;
    display: flex;
    align-items: center;
    user-select: none;
}

.dollar-sign {
    padding: 0 0.25rem 0 0.5rem;
    font-size: 1.1rem;
    color: var(--text-light);
    user-select: none;
}

.price-per-cigarette {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--accent-color);
    font-style: italic;
}

.savings-summary {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 2rem;
    border: 2px solid var(--secondary-color);
}

.savings-summary h3 {
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.amount-highlight {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.savings-summary p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.graph-panel {
    padding: 2rem;
}

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

.graph-header h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
}

.graph-options {
    display: flex;
    gap: 1rem;
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-light);
    font-size: 0.9rem;
}

.toggle-option input[type="checkbox"] {
    cursor: pointer;
}

.chart-container {
    position: relative;
    height: 350px;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-card {
    background: var(--background);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.result-card.primary {
    background: linear-gradient(135deg, var(--primary-color), #6ba3e5);
    color: var(--white);
}

.result-label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: inherit;
    opacity: 0.9;
}

.result-card:not(.primary) .result-label {
    color: var(--text-light);
}

.result-amount {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

.result-card:not(.primary) .result-amount {
    color: var(--text-dark);
}

.result-amount.profit {
    color: var(--secondary-color);
}

.explanation-box {
    background: #e7f3ff;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.explanation-box h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.explanation-box p {
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 0.95rem;
}

footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

footer p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--white);
    box-shadow: 0 2px 4px var(--shadow);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--white);
    box-shadow: 0 2px 4px var(--shadow);
}

.about-section {
    padding: 2.2rem 0;
    min-height: calc(100vh - 200px);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.mission-statement {
    background: var(--white);
    padding: 1.7rem 2.5rem 1rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 2rem;
}

.mission-statement h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.mission-statement p {
    color: var(--text-dark);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-section-block {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 1.5rem;
}

.about-section-block h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.about-section-block p {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.about-section-block ul {
    margin-left: 2rem;
    margin-top: 1rem;
}

.about-section-block li {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.support-message {
    background: linear-gradient(135deg, #e7f3ff, #f0f8ff);
    border: 2px solid var(--primary-color);
}

.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #3a7bc8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.about-footer {
    margin-top: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.disclaimer {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-style: italic;
}

.get-started-section {
    padding: 2.2rem 0;
    min-height: calc(100vh - 200px);
}

.get-started-content {
    max-width: 900px;
    margin: 0 auto;
}

.intro-message {
    background: var(--white);
    padding: 1rem 2.5rem 1rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 2rem;
    text-align: center;
}

.intro-message h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.intro-message p {
    color: var(--text-dark);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.step-section {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.advanced-section {
    border: 2px solid var(--accent-color);
}

.step-header {
    background: linear-gradient(135deg, var(--primary-color), #6ba3e5);
    color: var(--white);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.advanced-section .step-header {
    background: linear-gradient(135deg, var(--accent-color), #ffb733);
}

.step-number {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.step-header h3 {
    font-size: 1.5rem;
    margin: 0;
}

.advanced-tag {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: auto;
}

.step-content {
    padding: 2rem;
}

.step-content h4 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.step-content h4:first-child {
    margin-top: 0;
}

.step-content h5 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.step-content p {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.step-content ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.step-content li {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 0.8rem;
}

.example-box, .tip-box, .reality-check, .warning-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.example-box {
    background: #f0f8ff;
    border-left: 4px solid var(--primary-color);
}

.tip-box {
    background: #f0fff0;
    border-left: 4px solid var(--secondary-color);
}

.reality-check {
    background: #fff8e1;
    border-left: 4px solid var(--accent-color);
}

.warning-box {
    background: #fff3f3;
    border-left: 4px solid #e74c3c;
}

.process-steps {
    margin: 1.5rem 0;
}

.process-step {
    background: var(--background);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.8rem;
    border-left: 3px solid var(--primary-color);
}

.sub-steps {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-dark);
}

/* Collapsible sections */
.collapsible {
    cursor: pointer;
    transition: all 0.3s ease;
}

.collapsible:hover {
    opacity: 0.8;
}

.toggle-indicator {
    margin-left: auto;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    user-select: none;
}

.step-content.collapsed {
    display: none;
}

.subsection-content.collapsed {
    display: none;
}

.subsection-header {
    margin-bottom: 1rem;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.subsection-header:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.1);
}

.subsection-header h4 {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    color: var(--text-dark);
}

.subsection-header p {
    margin: 0.5rem 0 0 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.subsection-header .toggle-indicator {
    background: var(--primary-color);
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.expand-hint {
    color: var(--primary-color) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    margin-top: 0.75rem !important;
    font-style: italic;
}

.subsection-content {
    margin: 1rem 0 0 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border);
}

.encouragement-section {
    background: linear-gradient(135deg, #e7f3ff, #f0f8ff);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
    border: 2px solid var(--primary-color);
}

.encouragement-section h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.encouragement-section p {
    color: var(--text-dark);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.cta-button.secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.cta-button.secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.disclaimer-section {
    background: var(--background);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.disclaimer-section h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.disclaimer-section p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .step-header {
        padding: 1rem;
    }

    .step-content {
        padding: 1.5rem;
    }
}

/* Progress Tracking Styles */
.progress-section {
    padding: 2.2rem 0;
    min-height: calc(100vh - 200px);
}

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

.welcome-message {
    background: var(--white);
    padding: 1rem 2.5rem 2rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 2rem;
    text-align: center;
}

.welcome-message h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.welcome-message p {
    color: var(--text-dark);
    font-size: 1.1rem;
    line-height: 1.8;
}

.progress-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    gap: 2rem;
    margin-bottom: 3rem;
}

.progress-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    overflow: hidden;
}

.main-progress {
    grid-row: span 2;
}

.card-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1.5rem;
}

.card-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.card-content {
    padding: 2rem;
}

.progress-display {
    text-align: center;
    margin-bottom: 3rem;
}

.progress-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.progress-number span:first-child {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.progress-label {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.progress-money {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-money span:first-child {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
    line-height: 1;
}

.money-label {
    font-size: 1rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.quick-add h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-align: center;
}

.quick-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.quick-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-btn:hover {
    background: #3a7bc8;
    transform: translateY(-2px);
}

.custom-add {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.custom-add input {
    width: 120px;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.custom-add button {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.custom-add button:hover {
    background: #4a9c4a;
}

.goal-display {
    margin-bottom: 2rem;
}

.goal-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.goal-info span:first-child {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.goal-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.goal-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), #6cbf6c);
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 40px;
}

.goal-actions {
    display: flex;
    gap: 0.5rem;
}

.goal-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
    flex: 1;
}

.goal-btn:hover {
    background: #3a7bc8;
}

.goal-btn.secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.goal-btn.secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.price-setting {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.price-setting span {
    color: var(--text-light);
    font-size: 1.1rem;
}

.price-setting input {
    width: 100px;
    padding: 0.5rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.data-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.action-btn {
    background: var(--primary-color);
    color: var(--white);
}

.action-btn:hover {
    background: #3a7bc8;
}

.action-btn.warning {
    background: #e74c3c;
    color: var(--white);
}

.action-btn.warning:hover {
    background: #c0392b;
}

.milestones-list {
    max-height: 300px;
    overflow-y: auto;
}

.milestone {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.milestone:not(.achieved) {
    background: var(--background);
    opacity: 0.6;
}

.milestone.achieved {
    background: linear-gradient(135deg, #f0fff0, #e8f8e8);
    border: 1px solid var(--secondary-color);
}

.milestone-icon {
    font-size: 1.5rem;
}

.milestone-content h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-dark);
    font-size: 1rem;
}

.milestone-content p {
    margin: 0 0 0.25rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.milestone-count {
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.close {
    color: var(--white);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
}

.goal-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.goal-option {
    padding: 1.5rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.goal-option:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.goal-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--white);
}

.goal-option h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.goal-option p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.goal-input {
    margin-bottom: 1.5rem;
}

.goal-input label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.goal-input input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn {
    background: var(--primary-color);
    color: var(--white);
}

.modal-btn:hover {
    background: #3a7bc8;
}

.modal-btn.secondary {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--border);
}

.modal-btn.secondary:hover {
    background: var(--background);
}

/* Celebration message */
.celebration-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(92, 184, 92, 0.3);
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

/* Goal completion */
.goal-completion {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.completion-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    max-width: 400px;
}

.completion-content h3 {
    color: var(--secondary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.completion-content button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

    .main-progress {
        grid-row: span 1;
    }

    .quick-buttons {
        flex-wrap: wrap;
    }

    .custom-add {
        flex-direction: column;
        gap: 1rem;
    }

    .custom-add input {
        width: 100%;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .goal-options {
        grid-template-columns: 1fr;
    }
}

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

    .controls-panel {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .results-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        gap: 0rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .amount-highlight {
        font-size: 2rem;
    }

    .controls-panel,
    .graph-panel {
        padding: 1.5rem;
    }
}
