/* ========== GLOBAL STYLES ========== */
:root {
    /* Color Variables */
    --primary-color: #e75d41;
    --primary-light: #ffebe7;
    --primary-dark: #d84a2e;
    --text-dark: #333333;
    --text-medium: #666666;
    --text-light: #8a8a8a;
    --background-light: #ffffff;
    --background-gray: #f5f5f5;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --today-highlight: #fffadc;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Border Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    
    /* Box Shadow */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    --text-dark: #f0f0f0;
    --text-medium: #cccccc;
    --text-light: #aaaaaa;
    --background-light: #2d2d2d;
    --background-gray: #1a1a1a;
    --border-color: #444444;
    --today-highlight: #3d3a20;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    background-color: var(--background-gray);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 100%;
    margin: 0 auto;
}

/* ========== NAVIGATION ========== */
.app-nav {
    display: flex;
    justify-content: space-around;
    background-color: var(--background-light);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-sm) 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-sm);
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

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

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xs);
}

.nav-item span {
    font-size: 0.8rem;
}

.logo {
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.logo i {
    margin-right: var(--spacing-sm);
    font-size: 1.4rem;
}

/* User Menu */
.user-menu {
    position: relative;
    display: none;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.user-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 200px;
    background-color: var(--background-light);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-md);
    display: none;
    z-index: 110;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-info {
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
}

.user-email {
    color: var(--text-light);
    font-size: 0.8rem;
}

.user-action-btn {
    display: block;
    width: 100%;
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    border: none;
    border-radius: var(--border-radius-sm);
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.user-action-btn:last-child {
    margin-bottom: 0;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 70px; /* Space for the bottom nav */
}

.view {
    display: none;
    padding: var(--spacing-md);
    height: 100%;
    overflow-y: auto;
}

.active-view {
    display: block;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    position: sticky;
    top: 0;
    background-color: var(--background-gray);
    z-index: 10;
    padding: var(--spacing-sm) 0;
}

.view-header h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

.header-actions {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

/* ========== BUTTONS ========== */
.icon-button {
    background: none;
    border: none;
    color: var(--text-medium);
    font-size: 1.2rem;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.icon-button:hover {
    background-color: var(--background-gray);
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.primary-btn:hover {
    background-color: var(--primary-dark);
}

.wide-btn {
    width: 100%;
}

.today-btn {
    background-color: var(--background-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.today-btn:hover {
    background-color: var(--primary-light);
}

.secondary-btn {
    background-color: var(--background-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    display: inline-flex;
    align-items: center;
}

.secondary-btn i {
    margin-right: var(--spacing-xs);
}

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

/* ========== CALENDAR VIEW ========== */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    position: sticky;
    top: 70px;
    background-color: var(--background-gray);
    z-index: 5;
    padding: var(--spacing-sm) 0;
}

.calendar-controls h2 {
    font-size: 1.2rem;
    font-weight: bold;
}

.calendar-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.calendar-day {
    background-color: var(--background-light);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.calendar-day.today {
    background-color: var(--today-highlight);
    border-left: 4px solid var(--primary-color);
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.day-number {
    font-size: 1.5rem;
    font-weight: bold;
}

.today .day-number {
    color: var(--primary-color);
}

.day-name {
    color: var(--text-light);
    text-transform: uppercase;
    font-size: 0.8rem;
}

.day-meals {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.meal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm);
    border-left: 3px solid var(--primary-color);
    margin-bottom: var(--spacing-xs);
    background-color: var(--primary-light);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    cursor: pointer;
}

.meal-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.meal-icon {
    margin-right: var(--spacing-sm);
    color: var(--primary-color);
}

.meal-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    margin-right: var(--spacing-sm);
}

.meal-delete-btn {
    color: var(--text-medium);
}

.add-meal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    background-color: var(--background-gray);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: var(--spacing-sm);
}

.add-meal-btn i {
    margin-right: var(--spacing-xs);
}

/* ========== RECIPES VIEW ========== */
.search-container {
    position: relative;
    margin-bottom: var(--spacing-lg);
    position: sticky;
    top: 70px;
    z-index: 5;
    padding: var(--spacing-sm) 0;
    background-color: var(--background-gray);
}

.search-input {
    width: 100%;
    padding: var(--spacing-md);
    padding-left: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    background-color: var(--background-light);
    color: var(--text-dark);
}

.search-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.recipe-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-xl);
}

.recipe-card {
    background-color: var(--background-light);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

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

.recipe-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background-color: #f0f0f0;
}

.recipe-info {
    padding: var(--spacing-md);
}

.recipe-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: var(--spacing-xs);
}

.recipe-meta {
    display: flex;
    gap: var(--spacing-md);
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.recipe-meta span {
    display: flex;
    align-items: center;
}

.recipe-meta i {
    margin-right: var(--spacing-xs);
}

.recipe-description {
    color: var(--text-medium);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

/* ========== GROCERIES VIEW ========== */
.grocery-categories {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-xl);
}

.grocery-category {
    background-color: var(--background-light);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.category-header {
    font-weight: bold;
    margin-bottom: var(--spacing-md);
    color: var(--text-medium);
}

.grocery-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.grocery-item:last-child {
    border-bottom: none;
}

.grocery-checkbox {
    margin-right: var(--spacing-md);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.grocery-checkbox.checked {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.grocery-name {
    flex: 1;
}

.grocery-quantity {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-left: var(--spacing-md);
}

.completed {
    text-decoration: line-through;
    color: var(--text-light);
}

/* ========== RECIPE DETAIL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--background-light);
    margin: 0;
    width: 100%;
    min-height: 100%;
    position: relative;
    animation: slideUp 0.3s ease;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.4rem;
}

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

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-medium);
    cursor: pointer;
    z-index: 10;
}

.recipe-detail-container {
    padding: var(--spacing-md);
    max-height: 100%;
    overflow-y: auto;
}

.recipe-header {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.recipe-detail-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: var(--spacing-md);
}

.recipe-detail-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-md);
}

.recipe-detail-meta {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.meta-value {
    font-size: 1.2rem;
    font-weight: bold;
}

.meta-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
}

.recipe-detail-description {
    margin-bottom: var(--spacing-lg);
    color: var(--text-medium);
}

/* Servings adjuster */
.servings-adjuster {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.servings-adjuster span {
    margin: 0 var(--spacing-md);
    font-weight: bold;
}

.adjust-servings-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.recipe-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-md);
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.action-btn i {
    margin-right: var(--spacing-xs);
}

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

.groceries-btn {
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    color: var(--text-medium);
}

.adjust-btn {
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    color: var(--text-medium);
}

.recipe-section-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border-color);
}

.ingredients-list {
    margin-bottom: var(--spacing-lg);
}

.ingredient-item {
    display: flex;
    padding: var(--spacing-sm) 0;
}

.ingredient-quantity {
    font-weight: bold;
    margin-right: var(--spacing-sm);
    min-width: 80px;
}

.ingredient-name {
    flex: 1;
}

.ingredient-note {
    color: var(--text-light);
    font-style: italic;
    margin-left: var(--spacing-sm);
}

.instructions-list {
    counter-reset: instruction;
    margin-bottom: var(--spacing-lg);
}

.instruction-item {
    position: relative;
    padding: var(--spacing-md) 0;
    padding-left: 40px;
    border-bottom: 1px solid var(--border-color);
}

.instruction-item:last-child {
    border-bottom: none;
}

.instruction-item::before {
    counter-increment: instruction;
    content: counter(instruction);
    position: absolute;
    left: 0;
    top: var(--spacing-md);
    width: 28px;
    height: 28px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ========== RECIPE EDITOR ========== */
.editor-content {
    padding: var(--spacing-md);
    max-height: 100%;
    overflow-y: auto;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-row {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: bold;
    color: var(--text-medium);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    background-color: var(--background-light);
    color: var(--text-dark);
}

.image-upload-container {
    position: relative;
    width: 100%;
    height: 160px;
    margin-bottom: var(--spacing-md);
}

.image-upload {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.image-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--background-gray);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-light);
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview i {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.ingredient-row,
.instruction-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.ingredient-amount {
    width: 70px;
}

.ingredient-unit {
    width: 80px;
}

.ingredient-name {
    flex: 1;
}

.remove-ingredient-btn,
.remove-instruction-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.2rem;
}

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

.instruction-text {
    flex: 1;
    min-height: 60px;
}

.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.cancel-btn {
    background-color: var(--background-gray);
    color: var(--text-medium);
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    font-weight: bold;
    cursor: pointer;
}

.save-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    font-weight: bold;
    cursor: pointer;
}

/* ========== COOKING MODE ========== */
.cooking-mode-modal {
    background-color: var(--background-light);
}

.cooking-mode-content {
    display: flex;
    flex-direction: column;
    animation: none;
    background-color: var(--background-light);
}

.cooking-mode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: var(--background-light);
    z-index: 10;
}

.exit-cooking-mode-btn {
    background: none;
    border: none;
    color: var(--text-medium);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.cooking-mode-info {
    text-align: right;
}

.cooking-mode-info h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.cooking-servings {
    font-size: 0.9rem;
    color: var(--text-medium);
}

.cooking-steps-container {
    flex: 1;
    padding: var(--spacing-md);
    overflow-y: auto;
}

.cooking-progress {
    margin-bottom: var(--spacing-lg);
}

.progress-bar {
    height: 8px;
    background-color: var(--background-gray);
    border-radius: 4px;
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
}

.step-counter {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-medium);
}

.cooking-step-view {
    position: relative;
    min-height: 300px;
    margin-bottom: var(--spacing-lg);
}

.cooking-step {
    background-color: var(--background-light);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-md);
}

.step-number {
    display: inline-block;
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: bold;
    margin-right: var(--spacing-sm);
}

.step-content {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-top: var(--spacing-sm);
}

.step-timer {
    display: flex;
    align-items: center;
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm);
    background-color: var(--primary-light);
    border-radius: var(--border-radius-sm);
}

.timer-icon {
    margin-right: var(--spacing-sm);
    color: var(--primary-color);
}

.timer-value {
    flex: 1;
    font-weight: bold;
}

.timer-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
}

.cooking-controls {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-lg);
}

.cooking-control-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.cooking-control-btn:not(.primary-btn) {
    border: 1px solid var(--border-color);
    background-color: var(--background-light);
    color: var(--text-medium);
}

.cooking-sidebar {
    padding: var(--spacing-md);
    background-color: var(--background-gray);
    border-top: 1px solid var(--border-color);
}

.cooking-timers {
    margin-bottom: var(--spacing-lg);
}

.cooking-timers h3,
.cooking-ingredients h3 {
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
    color: var(--text-dark);
}

.timer-card {
    background-color: var(--background-light);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.timer-card.running {
    border-left: 3px solid var(--primary-color);
}

.timer-card.paused {
    border-left: 3px solid var(--warning-color);
}

.timer-card.completed {
    border-left: 3px solid var(--success-color);
}

.timer-label {
    flex: 1;
    font-weight: bold;
}

.timer-countdown {
    font-weight: bold;
    margin: 0 var(--spacing-md);
}

.timer-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.timer-action-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.timer-action-btn.pause {
    background-color: var(--warning-color);
    color: white;
}

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

.timer-action-btn.stop {
    background-color: var(--text-light);
    color: white;
}

.cooking-ingredients-list {
    background-color: var(--background-light);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    max-height: 200px;
    overflow-y: auto;
}

.cooking-ingredient-item {
    display: flex;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-color);
}

.cooking-ingredient-item:last-child {
    border-bottom: none;
}

.cooking-ingredient-amount {
    font-weight: bold;
    margin-right: var(--spacing-sm);
    min-width: 80px;
}

/* ========== RECIPE SELECTOR ========== */
.recipe-selector-content {
    max-width: 500px;
    max-height: 90vh;
}

.recipe-selector-body {
    padding: var(--spacing-md);
}

.recipe-dropdown {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
    background-color: var(--background-light);
    color: var(--text-dark);
}

.recipe-preview {
    margin-top: var(--spacing-lg);
}

.recipe-preview-card {
    background-color: var(--background-gray);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.recipe-preview-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.recipe-preview-info {
    padding: var(--spacing-md);
}

.recipe-preview-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: var(--spacing-xs);
}

.recipe-preview-meta {
    display: flex;
    gap: var(--spacing-md);
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.recipe-preview-meta span {
    display: flex;
    align-items: center;
}

.recipe-preview-meta i {
    margin-right: var(--spacing-xs);
}

.recipe-preview-description {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

/* ========== AUTH MODAL ========== */
.auth-content {
    max-width: 400px;
    max-height: 90vh;
    padding-bottom: var(--spacing-md);
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: var(--spacing-md);
    text-align: center;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-medium);
    font-weight: bold;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.auth-form {
    padding: var(--spacing-md);
    display: none;
}

.auth-form.active {
    display: block;
}

/* Settings */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background-color: var(--background-light);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

.setting-section {
    margin-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
    padding-top: var(--spacing-md);
}

.setting-section h3 {
    margin-bottom: var(--spacing-md);
    color: var(--text-medium);
}

.setting-section p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 26px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.4s;
    border-radius: 34px;
}

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

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

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

/* ========== RESPONSIVE DESIGN ========== */
@media (min-width: 768px) {
    .app-container {
        flex-direction: row;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .app-nav {
        position: sticky;
        top: 0;
        width: 80px;
        flex-direction: column;
        height: 100vh;
        padding: var(--spacing-lg) 0;
    }
    
    .logo {
        display: flex;
        flex-direction: column;
        margin-bottom: var(--spacing-lg);
    }
    
    .logo i {
        margin-right: 0;
        margin-bottom: var(--spacing-xs);
    }
    
    .user-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: auto;
        padding: var(--spacing-md) 0;
    }
    
    .user-dropdown {
        bottom: 0;
        left: 100%;
        top: auto;
    }
    
    .main-content {
        flex: 1;
        padding: var(--spacing-lg);
        padding-bottom: var(--spacing-lg);
        margin-left: 80px;
    }
    
    .recipe-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .modal-content {
        margin: 50px auto;
        width: 90%;
        max-width: 800px;
        min-height: auto;
        max-height: 90vh;
        border-radius: var(--border-radius-lg);
    }
    
    .form-row {
        flex-wrap: nowrap;
    }
    
    .cooking-mode-content {
        flex-direction: row;
        margin: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .cooking-steps-container {
        flex: 2;
        border-right: 1px solid var(--border-color);
    }
    
    .cooking-sidebar {
        flex: 1;
        border-top: none;
    }
    
    .recipe-selector-content {
        margin: 50px auto;
        width: 90%;
        max-width: 500px;
        min-height: auto;
        max-height: 90vh;
        border-radius: var(--border-radius-lg);
    }
    
    .auth-content {
        margin: 50px auto;
        width: 90%;
        max-width: 400px;
        min-height: auto;
        max-height: 90vh;
        border-radius: var(--border-radius-lg);
    }
}
