/* ============================================
   Variable Definitions
   ============================================ */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-light: linear-gradient(135deg, #f093fb 0%, #4facfe 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--gradient);
    min-height: 100vh;
    padding-bottom: 2rem;
}

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

/* ============================================
   Header Styles
   ============================================ */
.header {
    text-align: center;
    padding: 3rem 0 2rem;
    color: white;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.title-icon {
    font-size: 2.5rem;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'EmojiOne Color', 'Android Emoji', emoji;
    line-height: 1;
    display: inline-block;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* ============================================
   Bookmark Banner
   ============================================ */
.bookmark-banner {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 0 auto 2rem;
    max-width: 800px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bookmark-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

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

.bookmark-text {
    flex: 1;
    color: var(--text-color);
}

.bookmark-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 1rem;
}

.bookmark-link:hover {
    text-decoration: underline;
}

.bookmark-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0 0.5rem;
    line-height: 1;
}

.bookmark-close:hover {
    color: var(--text-color);
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    max-width: 900px;
    margin: 0 auto;
}

.calculator-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.card-header {
    margin-bottom: 2rem;
}

.card-header h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    font-weight: 600;
}

/* ============================================
   Input Section
   ============================================ */
.input-section {
    margin-bottom: 2rem;
}

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

.input-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.label-icon {
    font-size: 1.2rem;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.price-input-wrapper {
    display: flex;
    gap: 1rem;
}

.price-input-wrapper input {
    flex: 1;
}

.currency-select {
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    min-width: 120px;
}

.currency-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-hint {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.calculate-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-md);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-icon {
    font-size: 1.2rem;
}

/* ============================================
   Results Section
   ============================================ */
.results-section {
    margin-top: 2rem;
    animation: fadeIn 0.5s ease;
}

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

.results-header {
    margin-bottom: 1.5rem;
}

.results-header h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 600;
}

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

.cost-card {
    background: var(--gradient-light);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    color: white;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

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

.cost-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cost-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.cost-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* ============================================
   Impact Sections (Time, Health, Environmental)
   ============================================ */
.impact-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

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

.impact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.impact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.impact-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.impact-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

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

.impact-note {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 1rem;
    font-style: italic;
}

.health-stats,
.env-stats {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.health-stat,
.env-stat {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.stat-label {
    font-weight: 600;
    color: var(--text-color);
}

.stat-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* ============================================
   Savings Section
   ============================================ */
.savings-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.savings-title {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.savings-title .title-icon {
    font-size: 1.5rem;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'EmojiOne Color', 'Android Emoji', emoji;
    line-height: 1;
    display: inline-block;
}

.chart-container {
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 12px;
    padding: 1rem;
}

#savingsChart {
    width: 100%;
    height: 300px;
    display: block;
    max-width: 100%;
}

.savings-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.timeline-item {
    text-align: center;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.timeline-period {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.timeline-amount {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.timeline-desc {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* ============================================
   Motivation Section
   ============================================ */
.motivation-section {
    margin-bottom: 2rem;
}

.motivation-title {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.motivation-title .title-icon {
    font-size: 1.5rem;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'EmojiOne Color', 'Android Emoji', emoji;
    line-height: 1;
    display: inline-block;
}

.motivation-tips {
    display: grid;
    gap: 1rem;
}

.motivation-tip {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.motivation-tip:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.tip-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.tip-content h4 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.tip-content p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================================
   Rewards Section
   ============================================ */
.rewards-section {
    margin-bottom: 2rem;
}

.rewards-title {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.rewards-title .title-icon {
    font-size: 1.5rem;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'EmojiOne Color', 'Android Emoji', emoji;
    line-height: 1;
    display: inline-block;
}

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

.reward-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.reward-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.reward-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.reward-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.reward-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.reward-cost {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ============================================
   Recent Queries Section (like agecalculator.cc)
   ============================================ */
.recent-queries-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.recent-queries-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.recent-query-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.recent-query-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateX(3px);
}

.recent-query-content {
    flex: 1;
}

.recent-query-date {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 3px;
}

.recent-query-time {
    font-size: 0.8rem;
    color: var(--text-light);
}

.recent-query-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.recent-query-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gradient);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.recent-query-btn:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: var(--shadow-sm);
}

.recent-query-btn:active {
    transform: rotate(90deg) scale(0.95);
}

.recent-query-delete-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5576c;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 300;
    transition: all 0.3s ease;
    flex-shrink: 0;
    line-height: 1;
}

.recent-query-delete-btn:hover {
    background: #e63946;
    transform: scale(1.1);
    box-shadow: var(--shadow-sm);
}

.recent-query-delete-btn:active {
    transform: scale(0.95);
}

/* ============================================
   History Section (Legacy - kept for compatibility)
   ============================================ */
.history-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

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

.history-title {
    font-size: 1.2rem;
    color: var(--text-color);
    font-weight: 600;
    margin: 0;
}

.history-clear {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.history-clear:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.history-item:hover {
    background: #f0f0f0;
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.history-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.history-content {
    flex: 1;
    min-width: 0;
}

.history-main {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.history-cigs {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
}

.history-price {
    color: var(--text-light);
    font-size: 0.9rem;
}

.history-result {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.history-time {
    font-size: 0.8rem;
    color: var(--text-light);
    white-space: nowrap;
    flex-shrink: 0;
}

.history-delete {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: #ef4444;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    opacity: 0;
}

.history-item:hover .history-delete {
    opacity: 1;
}

.history-delete:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* ============================================
   FAQ Section
   ============================================ */
.faq-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.faq-title {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    font-weight: 600;
    color: var(--text-color);
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 1.25rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================================
   Floating Navigation
   ============================================ */
.floating-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px 15px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    min-width: 140px;
    max-width: 160px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.floating-nav-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.nav-icon {
    font-size: 1.2rem;
}

.nav-title {
    font-size: 0.9rem;
}

.floating-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.floating-nav-list li {
    margin: 0;
    padding: 0;
}

.nav-link {
    display: block;
    padding: 10px 12px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
}

.nav-link:hover {
    background: #f8f9fa;
    color: var(--text-color);
    transform: translateX(-3px);
}

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

/* ============================================
   Feedback Section
   ============================================ */
.feedback-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.feedback-title {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 600;
}

.feedback-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.feedback-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.feedback-submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.feedback-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.feedback-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.feedback-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 500;
    text-align: center;
}

.feedback-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: white;
    opacity: 0.9;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-disclaimer {
    font-size: 0.85rem;
    opacity: 0.8;
}

.footer-content a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.footer-content a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .title-icon {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
    }
    
    .price-input-wrapper {
        flex-direction: column;
    }
    
    .cost-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .savings-timeline {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reward-cards {
        grid-template-columns: 1fr;
    }
    
    .bookmark-content {
        flex-wrap: wrap;
    }
    
    .bookmark-link {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 2rem 0 1.5rem;
    }
    
    .title {
        font-size: 1.75rem;
        flex-direction: column;
    }
    
    .calculator-card {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .cost-cards {
        grid-template-columns: 1fr;
    }
    
    .savings-timeline {
        grid-template-columns: 1fr;
    }
    
    .motivation-tip {
        flex-direction: column;
        text-align: center;
    }
    
    .history-item {
        flex-wrap: wrap;
    }
    
    .history-time {
        width: 100%;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border-color);
    }
    
    .history-delete {
        opacity: 1;
    }
    
    .impact-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .health-stats,
    .env-stats {
        grid-template-columns: 1fr;
    }
    
    .floating-nav {
        display: none !important;
    }
    
    .feedback-section {
        padding: 1.5rem;
    }
}

