/* Coffee Craft Theme Stylesheet */

/* CSS Reset & Variables */
:root {
    /* Color Palette - Dark Brew (Default) */
    --bg-primary: #0a0605;
    --bg-secondary: #130b09;
    --bg-tertiary: #1f120e;
    --bg-card: rgba(31, 18, 14, 0.6);
    --bg-glass: rgba(19, 11, 9, 0.75);
    --text-primary: #f7f4eb;
    --text-secondary: #c5b9ae;
    --text-muted: #8e7f72;
    --gold-color: #d2a172;
    --gold-glow: rgba(210, 161, 114, 0.35);
    --accent-color: #e4b382;
    --border-color: rgba(210, 161, 114, 0.15);
    --border-hover: rgba(210, 161, 114, 0.4);
    --success-color: #87a987;
    --shadow-color: rgba(0, 0, 0, 0.65);
    --glass-blur: blur(16px);
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-ui: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
}

[data-theme="light"] {
    /* Color Palette - Light Brew */
    --bg-primary: #faf8f5;
    --bg-secondary: #f0ece3;
    --bg-tertiary: #e6dec9;
    --bg-card: rgba(230, 222, 201, 0.45);
    --bg-glass: rgba(240, 236, 227, 0.8);
    --text-primary: #2b1f1a;
    --text-secondary: #5c4e46;
    --text-muted: #8d7d74;
    --gold-color: #9c6c44;
    --gold-glow: rgba(156, 108, 68, 0.25);
    --accent-color: #b87b4c;
    --border-color: rgba(156, 108, 68, 0.2);
    --border-hover: rgba(156, 108, 68, 0.5);
    --success-color: #557255;
    --shadow-color: rgba(43, 31, 26, 0.08);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-weight: 400;
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* App Container Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 10;
    transition: var(--transition-smooth);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--gold-color), var(--accent-color));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #130b09;
    box-shadow: 0 4px 12px var(--gold-glow);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
}

.brand h1 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    transition: var(--transition-smooth);
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.nav-btn.active {
    background-color: var(--bg-tertiary);
    color: var(--gold-color);
    border-color: var(--border-color);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.nav-btn .icon {
    width: 18px;
    height: 18px;
}

/* Dashboard Statistics Widget */
.dashboard-stats {
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: auto;
}

.dashboard-stats h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 10px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--gold-color);
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

.fav-method-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.fav-label {
    color: var(--text-muted);
}

.fav-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Sidebar Footer & Theme Toggle */
.theme-toggle-btn {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    padding: 10px;
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font-ui);
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    box-shadow: 0 0 10px var(--gold-glow);
}

.theme-icon-light { display: none; }
.theme-icon-dark { display: inline; }

[data-theme="light"] .theme-icon-light { display: inline; }
[data-theme="light"] .theme-icon-dark { display: none; }

/* Main Content Workspace */
.main-content {
    flex: 1;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-intro h2 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, var(--text-primary), var(--gold-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-intro p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Tab Panels */
.tab-panel {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-panel.active {
    display: block;
}

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

/* Generator Split Workspace */
.generator-workspace {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 32px;
    align-items: start;
}

.panel-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 12px 36px var(--shadow-color);
    backdrop-filter: var(--glass-blur);
    transition: var(--transition-smooth);
}

.panel-card:hover {
    border-color: rgba(210, 161, 114, 0.22);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.step-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-color);
    background: rgba(210, 161, 114, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.panel-card h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 600;
}

.panel-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Generator Form Styling */
.generator-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group > label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* Options Grid for Brew Methods */
.options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.options-grid input[type="radio"] {
    display: none;
}

.option-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition-smooth);
}

.option-label:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: var(--border-hover);
}

.option-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.option-label span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.options-grid input[type="radio"]:checked + .option-label {
    background-color: rgba(210, 161, 114, 0.08);
    border-color: var(--gold-color);
    box-shadow: 0 0 12px var(--gold-glow);
}

.options-grid input[type="radio"]:checked + .option-label .option-icon {
    transform: scale(1.18);
}

.options-grid input[type="radio"]:checked + .option-label span {
    color: var(--text-primary);
}

/* Segmented Control */
.segmented-control {
    display: flex;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
}

.segmented-control input[type="radio"] {
    display: none;
}

.segmented-control label {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: calc(var(--radius-md) - 2px);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.segmented-control label:hover {
    color: var(--text-primary);
}

.segmented-control input[type="radio"]:checked + label {
    background-color: var(--bg-tertiary);
    color: var(--gold-color);
    box-shadow: 0 2px 6px var(--shadow-color);
}

/* Select Control */
.custom-select {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 12px;
    font-family: var(--font-ui);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: var(--transition-smooth);
}

.custom-select:focus {
    border-color: var(--gold-color);
    box-shadow: 0 0 10px var(--gold-glow);
}

/* Primary / Secondary Buttons */
.primary-btn {
    position: relative;
    background: linear-gradient(135deg, var(--gold-color), #b87b4c);
    border: none;
    border-radius: var(--radius-md);
    color: #130b09;
    padding: 16px 24px;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 8px var(--gold-glow);
    transition: var(--transition-smooth);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 16px var(--gold-glow);
}

.primary-btn:active {
    transform: translateY(1px);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: 0.75s;
}

.primary-btn:hover .btn-shine {
    left: 150%;
}

.secondary-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: var(--border-hover);
}

/* Empty State */
.recipe-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    min-height: 400px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: floating 4s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.recipe-empty-state h3 {
    margin-bottom: 8px;
    font-size: 20px;
}

.recipe-empty-state p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
    max-width: 320px;
}

/* Loader Screen Animation */
.generator-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 400px;
    animation: fadeIn 0.3s ease;
}

.generator-loader h3 {
    font-size: 18px;
    margin-top: 24px;
    margin-bottom: 8px;
}

.generator-loader p {
    color: var(--text-muted);
    font-size: 13px;
    max-width: 300px;
}

/* Interactive Coffee Brewer Loader */
.loader-visual {
    position: relative;
    width: 120px;
    height: 140px;
}

.loader-steam {
    position: absolute;
    top: 0;
    left: 45px;
    display: flex;
    gap: 8px;
}

.loader-steam span {
    width: 4px;
    height: 18px;
    background-color: var(--text-muted);
    opacity: 0.3;
    border-radius: 2px;
    animation: steamRise 1.6s infinite ease-in-out;
}

.loader-steam span:nth-child(2) {
    animation-delay: 0.4s;
    height: 24px;
}

.loader-steam span:nth-child(3) {
    animation-delay: 0.8s;
}

.loader-dripper {
    position: absolute;
    top: 28px;
    left: 30px;
    width: 60px;
    height: 40px;
    border: 3px solid var(--gold-color);
    border-top: none;
    border-radius: 0 0 30px 30px;
}

.dripper-top {
    position: absolute;
    top: -6px;
    left: -10px;
    width: 80px;
    height: 6px;
    background-color: var(--gold-color);
    border-radius: 3px;
}

.dripper-drips {
    position: absolute;
    bottom: -15px;
    left: 28px;
}

.drip {
    display: block;
    width: 4px;
    height: 12px;
    background-color: var(--gold-color);
    border-radius: 2px;
    animation: dripFall 0.8s infinite linear;
}

.loader-cup {
    position: absolute;
    bottom: 0;
    left: 35px;
    width: 50px;
    height: 45px;
    border: 3px solid var(--text-secondary);
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.loader-cup::after {
    content: '';
    position: absolute;
    top: 10px;
    right: -10px;
    width: 14px;
    height: 20px;
    border: 3px solid var(--text-secondary);
    border-radius: 0 8px 8px 0;
}

.coffee-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background-color: var(--gold-color);
    animation: cupFilling 3s infinite ease forwards;
}

@keyframes steamRise {
    0% { transform: translateY(0) scaleX(1); opacity: 0; }
    50% { transform: translateY(-10px) scaleX(1.4); opacity: 0.4; }
    100% { transform: translateY(-20px) scaleX(0.8); opacity: 0; }
}

@keyframes dripFall {
    0% { transform: translateY(-10px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(20px); opacity: 0; }
}

@keyframes cupFilling {
    0% { height: 0%; }
    80% { height: 75%; }
    100% { height: 75%; }
}

/* Recipe Detailed Layout styling */
.recipe-details {
    display: flex;
    flex-direction: column;
    gap: 28px;
    animation: fadeIn 0.5s ease;
}

.recipe-title-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.recipe-title-section h2 {
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent-color);
    font-style: italic;
}

.recipe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recipe-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.recipe-tag.roast-tag {
    background-color: rgba(210, 161, 114, 0.1);
    color: var(--gold-color);
}

.recipe-vibe-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    font-style: italic;
}

/* Parameters Grid */
.params-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.param-card {
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.param-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.param-value {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.param-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Flavor Profile Meters */
.flavor-profile-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.flavor-profile-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.flavor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.flavor-bar-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.flavor-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 500;
}

.flavor-bar-bg {
    height: 6px;
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
    overflow: hidden;
}

.flavor-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--gold-color), var(--accent-color));
    border-radius: 3px;
    width: 0;
    transition: width 1s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* Brew Instructions list */
.instructions-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.instructions-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.instructions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.instruction-step {
    display: flex;
    gap: 16px;
    background-color: rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-md);
}

.step-number-badge {
    width: 24px;
    height: 24px;
    border-radius: 12px;
    background-color: var(--gold-color);
    color: #130b09;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.step-duration {
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-color);
    text-transform: uppercase;
}

.step-text {
    font-size: 14px;
    color: var(--text-primary);
}

.recipe-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.recipe-actions .primary-btn {
    flex: 1.5;
}

.recipe-actions .secondary-btn {
    flex: 1;
}

/* Library Section Specifics */
.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.library-header h3 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 600;
}

.library-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-size: 14px;
    width: 240px;
    outline: none;
    transition: var(--transition-smooth);
}

.search-input:focus {
    border-color: var(--gold-color);
    box-shadow: 0 0 10px var(--gold-glow);
}

.filter-select {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.recipe-grid-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background-color: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center;
}

.recipe-grid-empty h3 {
    margin-bottom: 8px;
}

.recipe-grid-empty p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

/* Recipe Log Card in Grid */
.library-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
    transition: var(--transition-smooth);
}

.library-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 30px var(--shadow-color);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-color);
    cursor: pointer;
}

.card-title:hover {
    text-decoration: underline;
}

.card-stars {
    color: var(--gold-color);
    font-size: 14px;
}

.card-date {
    font-size: 10px;
    color: var(--text-muted);
}

.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    /* Limit lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-metrics {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--text-muted);
    background-color: rgba(0,0,0,0.12);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.card-metrics span strong {
    color: var(--text-primary);
}

.card-notes {
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: auto;
}

.card-actions button {
    font-size: 11px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

/* Immersive Timer Companion Overlay */
.brew-companion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 6, 5, 0.95);
    backdrop-filter: blur(20px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.4s ease;
}

.companion-box {
    width: 100%;
    max-width: 500px;
    background-color: rgba(31, 18, 14, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    text-align: center;
}

.close-companion-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.close-companion-btn:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.companion-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recipe-indicator {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold-color);
}

.companion-header h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
}

/* Circular Timer Display */
.timer-display-container {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.1s linear;
}

.timer-text-content {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.timer-seconds {
    font-size: 52px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.timer-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: -4px;
}

/* Immersive Water level indicator */
.brew-visualizer-glass {
    width: 100%;
    height: 28px;
    background-color: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
}

.visualizer-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(210, 161, 114, 0.4), rgba(210, 161, 114, 0.25));
    transition: height 0.5s ease;
}

.visualizer-label {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    z-index: 2;
}

.companion-instructions {
    min-height: 54px;
}

.companion-instructions p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.timer-controls {
    display: flex;
    gap: 12px;
    width: 100%;
}

.timer-btn {
    flex: 1;
}

.active-timer-btn {
    flex: 1.5;
}

.timer-steps-progress {
    display: flex;
    gap: 8px;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background-color: rgba(255,255,255,0.1);
    transition: var(--transition-smooth);
}

.step-dot.active {
    background-color: var(--gold-color);
    width: 16px;
}

.step-dot.completed {
    background-color: var(--success-color);
}

/* Modals & Rating overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 6, 5, 0.85);
    backdrop-filter: blur(8px);
    z-index: 110;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-box {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.6);
}

.modal-icon {
    font-size: 38px;
    text-align: center;
}

.modal-box h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    text-align: center;
}

.modal-box p {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

.modal-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.modal-rating span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.stars-input {
    display: flex;
    gap: 8px;
    font-size: 32px;
    color: rgba(255,255,255,0.1);
    cursor: pointer;
}

.stars-input span {
    transition: color 0.1s ease;
}

.stars-input span:hover,
.stars-input span.active {
    color: var(--gold-color);
}

.modal-box textarea {
    width: 100%;
    height: 90px;
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 12px;
    font-family: var(--font-ui);
    font-size: 13px;
    resize: none;
    outline: none;
    transition: var(--transition-smooth);
}

.modal-box textarea:focus {
    border-color: var(--gold-color);
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-actions button {
    flex: 1;
}

/* Helper Utilities */
.hidden {
    display: none !important;
}

/* Responsive Queries */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
    }
    
    .brand h1 {
        font-size: 18px;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .logo-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .nav-menu {
        flex-direction: row;
        gap: 4px;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .dashboard-stats, .sidebar-footer {
        display: none; /* Hide on mobile to keep simple */
    }
    
    .main-content {
        padding: 20px;
    }
    
    .generator-workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .params-grid {
        grid-template-columns: 1fr;
    }
    
    .flavor-grid {
        grid-template-columns: 1fr;
    }
    
    .recipe-actions {
        flex-direction: column;
    }
}
