/* =============== CSS VARIABLES =============== */
:root {
    --version: 3.0.0;
    --primary: #6d4c41;
    --primary-light: #9c786c;
    --primary-dark: #40241a;
    --secondary: #f5f5f5;
    --text: #333;
    --text-light: #666;
    --success: #4caf50;
    --info: #2196f3;
    --warning: #ff9800;
    --tip-bg: #e8f5e9;
    --tip-border: #4caf50;
    --border-radius: 8px;
    --transition: 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* =============== RESET & BASE =============== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--text);
    line-height: 1.6;
    padding: 10px;
    min-height: 100vh;
}

/* =============== SINGLE COLUMN LAYOUT (OVERRIDE) =============== */
/* This overrides any two-column grid for all screen sizes */
.content {
    display: block !important;
    /* grid-template-columns: 1fr !important; */ /* Removed as display:block makes it redundant */
}

.input-section,
.output-section {
    width: 100% !important;
    margin-bottom: 1.5rem;
}

.output-section {
    grid-column: auto !important;
}

/* =============== LAYOUT =============== */
.container {
    max-width: 650px; /* Adjusted base for consistency, overridden below */
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Narrow on desktop/larger screens */
@media (min-width: 1024px) {
    .container {
        max-width: 650px !important;
    }
}

/* Medium width on tablets */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        max-width: 550px !important;
    }
}

/* Full width on mobile with some padding */
@media (max-width: 767px) {
    .container {
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

.content {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .content {
        padding: 2rem;
    }
}

/* =============== HEADER =============== */
header {
    background-color: var(--primary);
    color: white;
    padding: 1.5rem 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    header {
        padding: 2rem;
    }
}

.header-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    padding: 15px;
    transition: background-color var(--transition);
}

.header-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.site-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
}

@media (min-width: 768px) {
    .site-title {
        font-size: 2.2rem;
    }
}

.header-logo {
    width: 70px;
    height: 70px;
    border-radius: 4px;
    object-fit: cover;
}

.title-text {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .title-text {
        font-size: 1.5rem;
    }
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 5px 0 0 50px;
}

@media (min-width: 768px) {
    .subtitle {
        font-size: 1.1rem;
    }
}

.bread-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 10px;
    display: inline-block;
}

/* =============== FOOTER =============== */
.app-footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 1.5rem 1rem;
    margin-top: 2rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    text-align: center;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .app-footer {
        padding: 1.5rem 2rem;
    }
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
}

.footer-versions-compact {
    text-align: center;
    margin-top: 0.5rem;
}

.version-display-compact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.version-display-compact span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.reset-btn {
    background: transparent;
    color: red !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition);
    margin-top: 10px;
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

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

/* =============== TYPOGRAPHY =============== */
h2 {
    color: var(--primary-dark);
    margin-bottom: 1.25rem;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.5rem;
}

/* =============== SECTIONS =============== */
.input-section,
.output-section {
    padding: 1.25rem;
    border-radius: var(--border-radius);
    background-color: var(--secondary);
    min-width: 0;
}

/* =============== FORM GROUPS =============== */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.label-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

label {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.back-to-top {
    color: var(--primary-light);
}

/* =============== SELECTION BUTTONS =============== */
.selection-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
}

/* Desktop layouts */
@media (min-width: 768px) {
    .selection-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .selection-buttons.crust-style,
    .selection-buttons.crumb-style,
    .selection-buttons.speed-style,
    .selection-buttons.container-buttons {
        grid-template-columns: repeat(4, 1fr);
    }

    .selection-buttons.poolish-option {
        grid-template-columns: repeat(2, 1fr);
    }

    .selection-buttons.optional-addins {
        grid-template-columns: repeat(4, 1fr);
    }

    .selection-buttons.flour-type-buttons,
    .selection-buttons.loaf-size-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Loaf size specific responsive */
@media (min-width: 1024px) {
    .selection-buttons.loaf-size-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile layouts */
@media (max-width: 767px) {
    .selection-buttons.flour-type-buttons,
    .selection-buttons.loaf-size-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .selection-buttons,
    .selection-buttons.flour-type-buttons,
    .selection-buttons.loaf-size-buttons {
        grid-template-columns: 1fr;
    }
}

/* Flour button specific styles */
.flour-type-buttons .selection-btn {
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Base button styles */
.selection-btn {
    background: white;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    padding: 12px;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 80px;
}

.selection-btn:hover {
    border-color: var(--primary-light);
    background: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.selection-btn.active {
    border-color: var(--primary);
    background: var(--tip-bg);
    box-shadow: 0 2px 8px rgba(109, 76, 65, 0.1);
}

.btn-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.btn-label {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.btn-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 3px;
}

/* Selection button color themes */
.loaf-size-buttons .selection-btn.active {
    border-color: #4caf50;
    background: #e8f5e9;
}

.hydration-style-buttons .selection-btn.active {
    border-color: #2196f3;
    background: #e3f2fd;
}

.crust-style .selection-btn.active {
    border-color: #ff9800;
    background: #fff3e0;
}

.crumb-style .selection-btn.active {
    border-color: #9c27b0;
    background: #f3e5f5;
}

.speed-style .selection-btn.active {
    border-color: #009688;
    background: #e0f2f1;
}

.container-buttons .selection-btn.active {
    border-color: #795548;
    background: #efebe9;
}

.poolish-option .selection-btn.active {
    border-color: #3f51b5;
    background: #e8eaf6;
}

.optional-addins .selection-btn.active {
    border-color: #3f51b5;
    background: #e8eaf6;
}

/* More flour options */
.more-flour-options {
    margin-top: 10px;
    animation: fadeIn var(--transition);
}

.more-options-btn {
    background: #f5f5f5;
    border: 2px dashed #ddd;
}

.more-options-btn:hover {
    background: #e8e8e8;
    border-color: var(--primary-light);
}

/* =============== ACTION BUTTONS =============== */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .button-group {
        flex-direction: row;
        gap: 1rem;
    }
}

.action-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 600;
    letter-spacing: 1px;
    flex: 1;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(109, 76, 65, 0.1);
}

.action-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#emailBtn {
    background-color: white;
    border: 2px solid var(--info);
    color: var(--info);
}

#emailBtn:hover {
    background-color: var(--info);
    color: white;
    border-color: var(--info);
}

/* Email button loading state */
.email-btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

.email-btn-loading::after {
    content: "...";
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* =============== OUTPUT CARDS =============== */
.output-card {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all var(--transition);
}

.output-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-summary-card {
    background: #f8f9fa !important;
    border-left: 4px solid var(--primary) !important;
    margin-bottom: 1.5rem !important;
}

.card-header {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    transition: all var(--transition);
}

.card-header:hover {
    background: #f0f0f0;
}

.quick-summary-card .card-header {
    background: transparent !important;
    border-bottom: 2px solid #e0e0e0 !important;
    cursor: default !important;
}

.quick-summary-card .card-header:hover {
    background: transparent !important;
}

/* .card-header.active styles removed as they appear unused or incorrect (darkgoldenrod) */

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

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

.header-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0;
    line-height: 1.2;
}

.header-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 2px;
}

.toggle-icon {
    font-size: 0.9rem;
    transition: transform var(--transition);
    color: var(--primary-light);
    flex-shrink: 0;
    margin-left: 10px;
}

/* .card-header.active .toggle-icon styles removed */

.card-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-content.expanded {
    max-height: 70vh;
    overflow-y: auto;
}

.quick-summary-card .card-content {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
}

.card-content.expanded::-webkit-scrollbar {
    width: 8px;
}

.card-content.expanded::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.card-content.expanded::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.card-content.expanded::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.card-content .result-item {
    padding: 1.25rem 1.5rem;
    margin: 0;
    border-bottom: 1px dashed #eee;
}

.card-content .result-item:last-child {
    border-bottom: none;
}

/* Section-specific styling */
.summary-card .card-header {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.detail-card .card-header {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.technical-card .card-header {
    background: #f3e5f5;
    border-left: 4px solid #9c27b0;
}

/* =============== OUTPUT DISPLAY =============== */
.result-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #ccc;
}

.result-label {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.6rem;
    font-size: 1rem;
    position: relative;
}

.result-value {
    font-size: 1rem;
    line-height: 1.4;
}

/* =============== BAKER PERCENTAGES GRID =============== */
.baker-percentages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 5px;
}

.percentage-item {
    padding: 8px 10px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid var(--primary-light);
}

.percentage-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 2px;
}

.percentage-value {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.percentage-note {
    font-size: 0.75rem;
    color: #999;
    font-style: italic;
}

/* =============== TIMELINE STYLES =============== */
.timeline-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.timeline-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-light);
}

.timeline-steps {
    position: relative;
    padding-left: 30px;
}

.timeline-steps::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-light);
}

.timeline-step {
    position: relative;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed #eee;
}

.timeline-step:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.timeline-step::before {
    content: "";
    position: absolute;
    left: -30px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary);
}

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

.step-time {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.step-duration {
    font-size: 0.85rem;
    color: var(--text-light);
    background: #f5f5f5;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.step-content {
    padding-left: 0.5rem;
}

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

.step-temperature,
.step-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.step-tutorial {
    margin-top: 0.75rem;
}

.step-tutorial summary {
    cursor: pointer;
    color: var(--primary);
    font-size: 0.85rem;
    padding: 0.5rem;
    background: #f8f8f8;
    border-radius: 4px;
    border: 1px solid #e8e8e8;
}

.step-tutorial summary:hover {
    background: #f0f0f0;
}

.tutorial-content {
    padding: 1rem;
    margin-top: 0.5rem;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid var(--primary-light);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
}

/* =============== BAKING RULES SECTION =============== */
.baking-rules-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.baking-rules-section .section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-light);
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.baking-rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.rule-category {
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rule-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rule-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
}

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

.rule-title {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1rem;
}

.rule-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rule-detail {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.25rem 0;
    border-bottom: 1px dashed #eee;
}

.rule-detail:last-child {
    border-bottom: none;
}

.rule-detail.final-rule {
    font-weight: 600;
    color: var(--primary-dark);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--primary);
}

.rule-label {
    font-size: 0.85rem;
    color: var(--text);
    flex: 1;
}

.rule-value {
    font-size: 0.85rem;
    color: var(--primary-dark);
    font-weight: 500;
    text-align: right;
    flex: 1;
    max-width: 60%;
    word-break: break-word;
}

.rule-note {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: #e3f2fd;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #1565c0;
    border-left: 3px solid #2196f3;
}

.rules-summary {
    padding: 1.5rem;
    background: #f0f7ff;
    border-radius: 8px;
    border: 1px solid #bbdefb;
    margin-top: 1.5rem;
}

.summary-header {
    font-weight: 600;
    color: #1565c0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.summary-item {
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e3f2fd;
}

.summary-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    display: block;
}

.summary-value {
    font-size: 0.9rem;
    color: var(--primary-dark);
    font-weight: 500;
}

.warning-summary {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #ffebee;
    border-radius: 6px;
    border: 1px solid #ffcdd2;
}

.warning-header {
    font-weight: 600;
    color: #c62828;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.warning-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.warning-item {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    font-size: 0.85rem;
    color: #d32f2f;
    border-left: 3px solid #f44336;
}

/* =============== NOTIFICATIONS =============== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    z-index: 1000;
    animation: slideIn var(--transition);
    max-width: 300px;
}

.notification.success { border-left-color: var(--success); }
.notification.info { border-left-color: var(--info); }
.notification.warning { border-left-color: var(--warning); }

/* =============== LOADING INDICATOR =============== */
.loading-indicator {
    display: none;
    padding: 10px;
    text-align: center;
    color: var(--primary);
    font-style: italic;
}

.loading-indicator.active {
    display: block;
    animation: pulse 1.5s infinite;
}

/* =============== VERSION DISPLAY =============== */
.version-display {
    color: white;
    font-size: 0.75rem;
    opacity: 1;
    margin-top: 0.5rem;
    font-family: "Courier New", monospace;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.version-display span {
    background: #dcdbdb;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: all var(--transition);
}

#ui-version-display { color: #bb86fc; }
#engine-version-display { color: #03dac6; }

#rules-version-display.loading,
#engine-version-display.loading {
    color: #ffb74d;
    animation: pulse 1.5s infinite;
}

#rules-version-display.error { color: #ef5350; }
#rules-version-display.matched,
#engine-version-display.matched { color: #66bb6a; }
#rules-version-display.mismatched,
#engine-version-display.mismatched { color: #ffa726; }

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

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

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* =============== ADMIN MODE STYLES =============== */
#baking-rules-heading.admin-click-progress {
    position: relative;
}

#baking-rules-heading.admin-click-progress::before {
    content: " ";
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 2px;
    background: linear-gradient(to right, #4caf50 33%, #ddd 33%);
    width: 100%;
}

#baking-rules-heading[data-click-count="2"]::before {
    background: linear-gradient(to right, #4caf50 66%, #ddd 66%);
}

#baking-rules-heading.admin-active::before {
    background: #4caf50;
    height: 3px;
}

/* =============== RESTORE ANIMATION =============== */
.restoring-preference {
    animation: pulseRestore 0.5s ease-in-out 2;
}

@keyframes pulseRestore {
    0%, 100% { background-color: white; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
    50% { background-color: #e8f5e9; box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2); }
}

/* =============== EXPERT MODE STYLES =============== */
.expert-hidden {
    display: none !important;
}

.expert-mode .expert-visible {
    display: block;
}

/* Optional visual indicator for expert mode */
.expert-mode .quick-summary-card {
    border-left-color: #9c27b0 !important;
}

.expert-mode .output-card {
    border-left: 3px solid #9c27b0;
}

/* Toggle styling */
.expert-toggle {
    user-select: none;
    display: flex !important; /* Ensure toggle is always visible */
    align-items: center;
    gap: 12px;
    background: #f5f5f5;
    padding: 8px 15px;
    border-radius: 40px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* =============== CUSTOM LOAF INPUT STYLES =============== */
#custom-loaf-weight {
    transition: all var(--transition);
}

#custom-loaf-weight:focus {
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(109, 76, 65, 0.1);
}

#custom-loaf-weight:disabled {
    background-color: #f5f5f5;
    opacity: 0.6;
    cursor: not-allowed;
}

#custom-loaf-size-container {
    animation: slideDown var(--transition);
}

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

/* =============== FLAVOR ENHANCEMENTS STYLES =============== */
.flavor-enhancements-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header section */
.flavor-header {
    background: linear-gradient(145deg, #fff9e6, #fff3d4);
    border-radius: 12px;
    padding: 16px;
    border-left: 6px solid #ff9800;
    margin-bottom: 8px;
}

.flavor-header-content {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.flavor-header-icon { font-size: 1.8rem; }
.flavor-header-title { margin: 0; color: #5d4037; font-size: 1.1rem; }
.flavor-header-text { margin: 0; color: #666; font-size: 0.9rem; }

/* Enhancements list */
.flavor-enhancements-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Enhancement card */
.flavor-card { /* Style for the enhancement cards themselves, distinct from output-card */
    background: white;
    border-radius: 10px;
    border: 1px solid #e8e0d0;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
}

.flavor-card-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #faf7f2;
    border-bottom: 1px solid #e8e0d0;
}

.flavor-card-icon {
    font-size: 1.6rem;
    margin-right: 12px;
}

.flavor-card-title {
    margin: 0;
    flex: 1;
    font-size: 1rem;
    color: #5d4037;
    font-weight: 600;
}

.flavor-card-badges {
    display: flex;
    gap: 8px;
}

.flavor-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.05);
}

/* Badge variants */
.flavor-badge-effort { background-color: rgba(76, 175, 80, 0.15); }
.flavor-badge-effort-medium { background-color: rgba(255, 152, 0, 0.15); }
.flavor-badge-effort-high { background-color: rgba(244, 67, 54, 0.15); }
.flavor-badge-impact { background-color: rgba(33, 150, 243, 0.15); }
.flavor-badge-impact-medium { background-color: rgba(156, 39, 176, 0.15); }
.flavor-badge-impact-high { background-color: rgba(233, 30, 99, 0.15); }

/* Card content */
.flavor-card-content {
    padding: 16px;
}

.flavor-description {
    margin: 0 0 12px 0;
    color: #424242;
    line-height: 1.5;
    font-size: 0.92rem;
}

.flavor-footer {
    display: flex;
    justify-content: flex-end;
}

.flavor-tag {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border-left: 3px solid #4caf50;
}

/* Enhancement specific styles */
.buttermilk-recommendation {
    margin-top: 10px;
    padding: 10px;
    background: #fff3e0;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.buttermilk-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.buttermilk-item-icon { font-size: 1.1rem; }
.buttermilk-item-label { font-weight: 600; }
.buttermilk-item-value { color: #666; }

/* Pullman enhancement */
.pullman-recommendation {
    margin-top: 12px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}
.pullman-recommendation p { margin: 0; }

/* Baker's tip section */
.flavor-tip {
    margin-top: 16px;
    padding: 14px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px dashed #bcaaa4;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.flavor-tip-icon { font-size: 1.2rem; color: #8d6e63; }
.flavor-tip-content { font-size: 0.85rem; color: #5d4037; }
.flavor-tip-title { display: block; margin-bottom: 4px; font-weight: 600; }
.flavor-tip-text { color: #6d4c41; }

/* Empty state */
.flavor-empty-state {
    padding: 20px;
    text-align: center;
    color: #666;
    background: #f8f8f8;
    border-radius: 8px;
}
.flavor-empty-icon { font-size: 2rem; display: block; margin-bottom: 10px; }

/* Prevent flavor card header from changing color when active */
.flavor-card .card-header.active,
.flavor-card .card-header.active:hover,
#flavor-link.card-header.active {
    background: #faf7f2 !important;
    border-bottom: 1px solid #e8e0d0 !important;
}
.flavor-card .flavor-header {
    background: linear-gradient(145deg, #fff9e6, #fff3d4) !important;
    border-left: 6px solid #ff9800 !important;
}
.flavor-card .card-header.active .flavor-card-icon,
.flavor-card .card-header.active .flavor-card-title,
.flavor-card .card-header.active .flavor-card-badges,
#flavor-link.card-header.active .flavor-card-icon,
#flavor-link.card-header.active .flavor-card-title,
#flavor-link.card-header.active .flavor-card-badges {
    color: inherit !important;
}
div.output-card.flavor-card div#flavor-link.card-header.active {
    background-color: #faf7f2 !important;
    color: #5d4037 !important;
}

/* Responsive adjustments for flavor */
@media (max-width: 768px) {
    .flavor-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .flavor-card-icon { margin-right: 0; }
    .flavor-card-badges { width: 100%; justify-content: flex-start; }
}
@media (max-width: 480px) {
    .flavor-header { padding: 12px; }
    .flavor-card-content { padding: 12px; }
    .flavor-tip { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* =============== AMAZON SHOPPING SECTION =============== */
.shopping-card .card-header {
    background: #fff3e0;
    border-left: 4px solid #ff9900;
}

.shopping-container {
    padding: 1.5rem;
}

.shopping-disclaimer {
    background: #f8f9fa;
    border-left: 4px solid #ff9900;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #666;
}
.shopping-disclaimer p { margin: 0; }

.shopping-categories {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.shopping-category {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1.5rem;
}
.shopping-category:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.shopping-category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-dark);
    font-size: 1rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--primary-light);
}
.shopping-category-icon { font-size: 1.2rem; }

.shopping-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.shopping-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
    position: relative;
}

.shopping-link:hover {
    background: #fff3e0;
    border-color: #ff9900;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 153, 0, 0.1);
}

.shopping-link-icon { font-size: 1.1rem; }
.shopping-link-text { flex: 1; font-size: 0.9rem; font-weight: 500; }
.shopping-link-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    white-space: nowrap;
}
.shopping-link-badge[class*="Essential"] { background: #2196f3; }
.shopping-link-badge[class*="Must-Have"] { background: #4caf50; }
.shopping-link-badge[class*="Best"] { background: #ff9800; }
.shopping-link-badge[class*="Recommended"] { background: #9c27b0; }

.shopping-tips {
    margin-top: 2rem;
    padding: 1rem;
    background: #e8f5e9;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
}

.shopping-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0.75rem;
}
.shopping-tip:last-child { margin-bottom: 0; }
.shopping-tip-icon { font-size: 1rem; flex-shrink: 0; }
.shopping-tip-text { font-size: 0.9rem; color: #2e7d32; }

/* =============== FAQ SECTION =============== */
.faq-card .card-header {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.faq-container {
    padding: 1.5rem;
}

/* Search */
.faq-search { margin-bottom: 1.5rem; }
.faq-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-size: 0.95rem;
    transition: all var(--transition);
}
.faq-search-input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Categories */
.faq-categories {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.faq-category {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1.5rem;
}
.faq-category:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.faq-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1976d2;
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #bbdefb;
}
.faq-category-icon { font-size: 1.3rem; }

/* FAQ Items */
.faq-item {
    margin-bottom: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #2c3e50;
}
.faq-question:hover { background: #e3f2fd; }
.faq-question.active {
    background: #e3f2fd;
    border-bottom: 1px solid #bbdefb;
}
.faq-question-text { flex: 1; font-size: 0.95rem; }
.faq-toggle {
    font-size: 0.8rem;
    color: #1976d2;
    transition: transform var(--transition);
    margin-left: 1rem;
}
.faq-question.active .faq-toggle { transform: rotate(180deg); }

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition);
    background: white;
}
.faq-answer.active {
    padding: 1.25rem;
    max-height: 4000px; /* Increased to accommodate longer answers */
}

.faq-answer p { margin: 0 0 0.75rem 0; color: #505050; font-size: 0.92rem; line-height: 1.5; }
.faq-answer ul, .faq-answer ol {
    margin: 0.5rem 0 0.75rem 1.5rem;
    color: #505050;
    font-size: 0.92rem;
    line-height: 1.5;
}
.faq-answer li { margin-bottom: 0.3rem; }
.faq-answer strong { color: #2c3e50; }

/* Tips within answers */
.faq-tip {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.faq-tip-icon { font-size: 1.1rem; color: #ff9800; }
.faq-tip span:last-child { font-size: 0.88rem; color: #5d4037; flex: 1; }

/* Tables */
.faq-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.88rem;
}
.faq-table th {
    background: #1976d2;
    color: white;
    padding: 0.5rem;
    text-align: left;
    font-weight: 500;
}
.faq-table td {
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
}
.faq-table tr:nth-child(even) { background: #f8f9fa; }
.faq-table-note { font-size: 0.85rem; color: #666; font-style: italic; margin-top: 0.25rem; }

/* More help section */
.faq-more-help {
    margin-top: 2rem;
    padding: 1.25rem;
    background: #e8f5e9;
    border-radius: 10px;
    border-left: 4px solid #4caf50;
}
.faq-more-help-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}
.faq-more-help-icon { font-size: 2rem; line-height: 1; }
.faq-more-help-text { flex: 1; }
.faq-more-help-text strong { display: block; margin-bottom: 0.25rem; color: #2e7d32; font-size: 1rem; }
.faq-more-help-text p { margin: 0; font-size: 0.9rem; color: #505050; }
.faq-more-help-text a { color: #1976d2; text-decoration: none; font-weight: 500; }
.faq-more-help-text a:hover { text-decoration: underline; }

/* Highlight for search */
.faq-highlight { background-color: #fff9c4; padding: 0 2px; }

/* =============== LEGAL SECTION =============== */
.legal-card .card-header {
    background: #e8f5e9;
    border-left: 4px solid #9c27b0;
}
.legal-container { padding: 1.5rem; }
.legal-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}
.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.legal-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #5e35b1;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #b39ddb;
}
.legal-section-icon { font-size: 1.2rem; }
.legal-section-content {
    color: #424242;
    font-size: 0.92rem;
    line-height: 1.5;
}
.legal-section-content p { margin: 0 0 0.75rem 0; }
.legal-section-content p:last-child { margin-bottom: 0; }
.legal-section-content strong { color: #2c3e50; }
.legal-section-content a { color: #1976d2; text-decoration: none; }
.legal-section-content a:hover { text-decoration: underline; }

.affiliate-disclaimer {
    background: rgba(255, 153, 0, 0.05);
    border-left: 4px solid #ff9900;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin: 0.5rem 0;
}
.legal-copyright {
    margin-top: 1.5rem;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: #757575;
    border-top: 1px solid #e0e0e0;
}

/* =============== RESPONSIVE ADJUSTMENTS (GENERAL) =============== */
@media (max-width: 768px) {
    .baking-rules-grid,
    .summary-grid,
    .shopping-links { grid-template-columns: 1fr; }

    .rule-detail,
    .adjustment-item { flex-direction: column; gap: 0.25rem; }
    .rule-value { text-align: left; max-width: 100%; }
    .adjustment-change { align-self: flex-start !important; }

    .output-section { padding: 1rem !important; }
    .output-card { margin-bottom: 1rem; border-radius: 10px; }
    .card-header { padding: 1rem; }
    .header-content { gap: 10px; }
    .header-icon { font-size: 1.3rem; }
    .header-title { font-size: 1rem; }
    .header-subtitle { font-size: 0.8rem; }
    .card-content .result-item { padding: 1rem; }

    .faq-container,
    .legal-container,
    .shopping-container { padding: 1rem; }
    .faq-question { padding: 0.875rem 1rem; }
    .faq-question-text { font-size: 0.9rem; }
    .faq-answer.active { padding: 1rem; }
    .faq-table { font-size: 0.8rem; }
    .faq-table th,
    .faq-table td { padding: 0.35rem; }
    .faq-more-help-content { flex-direction: column; gap: 10px; }

    .legal-section { margin-bottom: 1.5rem; padding-bottom: 1.25rem; }
    .legal-section-title { font-size: 0.95rem; margin-bottom: 0.75rem; }
    .legal-section-content { font-size: 0.88rem; }
}

@media (max-width: 480px) {
    .baking-rules-section,
    .rule-category { padding: 0.75rem; }
    .header-content { flex-direction: column; align-items: flex-start; gap: 5px; }
    .header-title { font-size: 0.95rem; }
    .header-subtitle { font-size: 0.75rem; }
    .faq-category-title { font-size: 1rem; }
    .faq-table { display: block; overflow-x: auto; white-space: nowrap; }
    .legal-container { padding: 0.75rem; }
    .shopping-link { flex-wrap: wrap; }
    .shopping-link-badge { margin-left: auto; }
}

/* =============== ENHANCED HEADER & NAVIGATION (Keep if used) =============== */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.header-brand { padding: 1.5rem 2rem; }
.brand-link {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: white;
}
.brand-link:hover .header-logo { transform: rotate(5deg) scale(1.05); }
.brand-text { flex: 1; }
.site-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 0.3rem 0;
    letter-spacing: -0.5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0;
    font-style: italic;
}
/* Main Navigation */
.main-nav {
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 2rem;
    gap: 0.5rem;
}
.nav-item { flex: 1; min-width: 0; }
.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    text-decoration: none;
    color: rgba(255,255,255,0.9);
    border-bottom: 3px solid transparent;
    transition: all var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: #FFD700;
    transition: width var(--transition);
}
.nav-link:hover::before,
.nav-link.active::before { width: 80%; }
.nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}
.nav-link.active {
    color: white;
    background: rgba(255,255,255,0.15);
    border-bottom-color: #FFD700;
}
.nav-icon {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3));
}
.nav-label {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.nav-description {
    font-size: 0.75rem;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 1rem;
}
.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    position: relative;
    transition: background var(--transition);
}
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: white;
    transition: transform var(--transition);
}
.hamburger::before { transform: translateY(-8px); }
.hamburger::after { transform: translateY(8px); }
.mobile-menu-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.mobile-menu-toggle[aria-expanded="true"] .hamburger::before { transform: rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] .hamburger::after { transform: rotate(-45deg); }

/* Breadcrumb Navigation */
.breadcrumb {
    padding: 0.75rem 2rem;
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
    color: var(--text-light);
}
.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

/* Enhanced Footer (if used) */
.footer-info { flex: 2; min-width: 250px; }
.footer-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.footer-nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.7rem;
    transition: color var(--transition);
}
.footer-nav a:hover {
    color: white;
    text-decoration: underline;
}
.footer-versions {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    font-family: monospace;
    opacity: 0.7;
}

/* Responsive for enhanced header */
@media (max-width: 1024px) {
    .nav-menu { padding: 0 1rem; }
    .nav-description { display: none; }
    .nav-label { font-size: 0.85rem; }
}
@media (max-width: 768px) {
    .header-brand { padding: 1rem; }
    .brand-link { gap: 1rem; }
    .header-logo { width: 110px; height: 110px; }
    .site-title { font-size: 1.5rem; }
    .subtitle { font-size: 0.9rem; }
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        z-index: 200;
    }
    .main-nav { position: relative; }
    .nav-menu {
        display: none;
        flex-direction: column;
        padding: 0;
        gap: 0;
        background: var(--primary);
    }
    .nav-menu.active { display: flex; }
    .nav-item {
        width: 100%;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    .nav-link {
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    .nav-link::before { display: none; }
    .nav-icon {
        font-size: 1.5rem;
        margin-bottom: 0;
        width: 30px;
        text-align: center;
    }
    .nav-label {
        font-size: 1rem;
        margin-bottom: 0;
        text-transform: none;
    }
    .nav-description {
        display: block;
        font-size: 0.8rem;
        margin-left: auto;
        opacity: 0.7;
    }
    .breadcrumb { padding: 0.5rem 1rem; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-nav { justify-content: center; }
}
@media (max-width: 480px) {
    .nav-description { display: none; }
    .footer-versions { flex-direction: column; gap: 0.25rem; }
}

/* Amazon Featured Button Styles */
.amazon-featured-wrapper {
    margin: 0 0 1.5rem 0;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.amazon-featured-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    background: linear-gradient(145deg, #f8f6f2, #f0ebe4) !important;
    border: 2px solid #d4a373 !important;
    border-radius: var(--border-radius) !important;
    padding: 20px !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(212, 163, 115, 0.2) !important;
    position: relative !important;
    overflow: hidden !important;
}

.amazon-featured-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(212, 163, 115, 0.3) !important;
    border-color: #b4805f !important;
}

.amazon-featured-btn:active {
    transform: translateY(-1px) !important;
}

.amazon-featured-btn div:first-child {
    margin-bottom: 5px !important;
}

/* Pulse animation on first load */
@keyframes subtlePulse {
    0% { box-shadow: 0 4px 12px rgba(212, 163, 115, 0.2); }
    50% { box-shadow: 0 4px 18px rgba(212, 163, 115, 0.4); }
    100% { box-shadow: 0 4px 12px rgba(212, 163, 115, 0.2); }
}

.amazon-featured-wrapper {
    animation: fadeIn 0.5s ease, subtlePulse 2s ease 2;
}