:root {
    --primary: #FACC15;
    --primary-dark: #EAB308;
    --secondary: #F97316;
    --accent: #EC4899;
    --success: #10B981;
    --danger: #EF4444;
    --info: #3B82F6;
    --purple: #A855F7;
    
    --bg-dark: #000000;
    --bg-card: #1F2937;
    --bg-elevated: #374151;
    --border: #4B5563;
    --text-primary: #FFFFFF;
    --text-secondary: #D1D5DB;
    --text-muted: #9CA3AF;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    font-size: 80px;
    margin-bottom: 24px;
    animation: bounce 1s infinite;
}

.loading-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Main App Container */
.app-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Screens */
.screen {
    display: none;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 80px;
    -webkit-overflow-scrolling: touch;
}

.screen.active {
    display: block;
}

/* Confetti */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Timer Bubble */
.timer-bubble {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    box-shadow: var(--shadow-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    cursor: move;
    animation: float 3s ease-in-out infinite;
    color: var(--bg-dark);
}

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

.timer-content {
    text-align: center;
}

.timer-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.timer-display {
    font-size: 14px;
    font-weight: 700;
}

/* HOME SCREEN */
.swipe-header {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
    padding: 16px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}

.stats-left, .stats-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.stat-icon {
    width: 16px;
    height: 16px;
}

.streak-badge {
    background: rgba(249, 115, 22, 0.2);
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.level-badge {
    background: rgba(168, 85, 247, 0.2);
    border: 2px solid var(--purple);
    color: var(--purple);
}

.xp-badge {
    background: rgba(250, 204, 21, 0.2);
    border: 2px solid var(--primary);
    color: var(--primary);
}

.roulette-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(250, 204, 21, 0.2);
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.roulette-btn:hover {
    background: rgba(250, 204, 21, 0.3);
    transform: scale(1.05);
}

.roulette-icon {
    font-size: 16px;
}

.xp-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
}

.xp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--accent));
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Recipe Card */
.recipe-swipe-area {
    height: calc(100vh - 280px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.recipe-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: 620px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.recipe-card.swiping-left {
    transform: translateX(-150%) rotate(-15deg);
    opacity: 0;
}

.recipe-card.swiping-right {
    transform: translateX(150%) rotate(15deg);
    opacity: 0;
}

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

.recipe-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.4), transparent);
    pointer-events: none;
}

.recipe-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    color: white;
}

.recipe-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.badge-xp {
    background: var(--primary);
    color: var(--bg-dark);
}

.badge-info {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
}

.recipe-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.2;
}

.recipe-cuisine {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 16px;
}

.recipe-ingredients {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.ingredient-tag {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    font-size: 12px;
}

.recipe-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recipe-price {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
}

.price-icon {
    width: 16px;
    height: 16px;
}

.btn-start-cooking {
    padding: 10px 20px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-start-cooking:hover {
    background: #059669;
    transform: scale(1.05);
}

.swipe-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.swipe-overlay.show-skip {
    opacity: 1;
    background: rgba(239, 68, 68, 0.3);
}

.swipe-overlay.show-like {
    opacity: 1;
    background: rgba(16, 185, 129, 0.3);
}

/* Swipe Actions */
.swipe-actions {
    position: fixed;
    bottom: 100px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    z-index: 10;
}

.action-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.action-btn:active {
    transform: scale(0.9);
}

.action-btn svg {
    width: 28px;
    height: 28px;
}

.action-skip {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}

.action-skip:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
}

.action-ai {
    width: 52px;
    height: 52px;
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--info);
    color: var(--info);
}

.action-ai:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: scale(1.1);
}

.action-ai svg {
    width: 24px;
    height: 24px;
}

.action-like {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: var(--success);
}

.action-like:hover {
    background: rgba(16, 185, 129, 0.3);
    transform: scale(1.1);
}

/* Screen Headers */
.screen-header {
    padding: 24px 16px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.screen-title {
    font-size: 32px;
    font-weight: 800;
}

.screen-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    margin-top: 4px;
}

.btn-add {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: var(--bg-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-add:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.btn-add svg {
    width: 24px;
    height: 24px;
    stroke-width: 3;
}

/* PANTRY SCREEN */
.scanner-btn {
    margin: 0 16px 24px;
    padding: 20px;
    background: linear-gradient(135deg, var(--info), var(--purple));
    border: none;
    border-radius: 16px;
    color: white;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.scanner-icon {
    width: 32px;
    height: 32px;
}

.scanner-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.scanner-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.pantry-content {
    padding: 0 16px;
}

.pantry-category {
    margin-bottom: 24px;
}

.category-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.pantry-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pantry-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
}

.pantry-item-name {
    font-size: 16px;
    font-weight: 600;
}

.pantry-item-quantity {
    color: var(--text-muted);
    font-size: 14px;
}

.btn-find-recipes {
    margin: 24px 16px;
    padding: 16px;
    width: calc(100% - 32px);
    background: var(--success);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-find-recipes:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* MEAL PLANNER SCREEN */
.streak-warning {
    margin: 0 16px 24px;
    padding: 20px;
    background: linear-gradient(135deg, var(--secondary), var(--danger));
    border-radius: 16px;
    color: white;
    display: flex;
    align-items: center;
    gap: 16px;
}

.streak-warning-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.streak-warning-icon svg {
    width: 32px;
    height: 32px;
}

.streak-warning-content {
    flex: 1;
}

.streak-warning-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.streak-warning-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.btn-auto-fill {
    padding: 10px 16px;
    background: white;
    color: var(--bg-dark);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.meal-planner-content {
    padding: 0 16px;
}

.meal-day {
    margin-bottom: 16px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
}

.meal-day-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.meal-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meal-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.meal-slot:hover {
    background: var(--border);
}

.meal-slot-name {
    font-size: 14px;
    color: var(--text-muted);
}

.meal-slot svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* TASTEMATCH SCREEN */
.dating-header {
    padding: 24px 16px;
    text-align: center;
    position: relative;
}

.dating-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.dating-subtitle {
    color: var(--text-muted);
    font-size: 16px;
}

.match-counter {
    position: absolute;
    top: 24px;
    right: 16px;
    padding: 8px 16px;
    background: var(--accent);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.dating-card-area {
    height: calc(100vh - 320px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dating-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: 620px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}

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

.profile-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.4), transparent);
}

.compatibility-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 16px;
    background: var(--success);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.profile-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    color: white;
}

.profile-name {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.profile-bio {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 16px;
}

.profile-food {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    font-size: 14px;
}

.food-icon {
    font-size: 18px;
}

.dating-actions {
    position: fixed;
    bottom: 100px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 0 20px;
    z-index: 10;
}

.action-match {
    background: rgba(236, 72, 153, 0.2);
    border-color: var(--accent);
    color: var(--accent);
}

.action-match:hover {
    background: rgba(236, 72, 153, 0.3);
    transform: scale(1.1);
}

/* MARKET SCREEN */
.btn-create-listing {
    margin: 0 16px 24px;
    padding: 16px;
    width: calc(100% - 32px);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--bg-dark);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-create-listing:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-create-listing svg {
    width: 20px;
    height: 20px;
}

.market-listings {
    padding: 0 16px;
}

.market-listing {
    display: flex;
    gap: 16px;
    padding: 16px;
    margin-bottom: 16px;
    background: var(--bg-card);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.market-listing:hover {
    background: var(--bg-elevated);
    transform: translateY(-2px);
}

.listing-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
}

.listing-content {
    flex: 1;
}

.listing-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.listing-chef {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.listing-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.listing-price {
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
}

.listing-distance {
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.listing-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(250, 204, 21, 0.2);
    border-radius: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.chef-cta {
    margin: 24px 16px;
    padding: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    text-align: center;
    color: var(--bg-dark);
}

.cta-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.cta-text {
    font-size: 16px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.btn-become-chef {
    padding: 12px 32px;
    background: var(--bg-dark);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-become-chef:hover {
    transform: scale(1.05);
}

/* PROFILE SCREEN */
.profile-header-section {
    padding: 32px 16px;
    text-align: center;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--purple), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.profile-level-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.profile-rank {
    color: var(--text-muted);
    font-size: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 16px 32px;
}

.stat-card {
    padding: 20px;
    border-radius: 16px;
    border: 2px solid;
}

.stat-streak {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
}

.stat-xp {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.3);
}

.stat-recipes {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.stat-earnings {
    background: rgba(250, 204, 21, 0.1);
    border-color: rgba(250, 204, 21, 0.3);
}

.stat-card-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
}

.stat-streak svg {
    color: var(--secondary);
}

.stat-xp svg {
    color: var(--purple);
}

.stat-recipes svg {
    stroke-width: 2;
    color: var(--info);
}

.stat-earnings svg {
    stroke-width: 2;
    color: var(--primary);
}

.stat-card-value {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-card-label {
    color: var(--text-muted);
    font-size: 14px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    padding: 0 16px;
}

.achievements-section {
    margin-bottom: 32px;
}

.achievement-list {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 16px;
}

.achievement-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(250, 204, 21, 0.2);
}

.achievement-content {
    flex: 1;
}

.achievement-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.achievement-description {
    color: var(--text-muted);
    font-size: 14px;
}

.settings-section {
    margin-bottom: 32px;
}

.setting-card {
    margin: 0 16px 12px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 16px;
}

.setting-header {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.setting-description {
    color: var(--text-muted);
    font-size: 14px;
}

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

.theme-selector {
    display: flex;
    gap: 8px;
}

.theme-btn {
    flex: 1;
    padding: 10px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-btn:hover {
    background: var(--border);
}

.theme-btn.active {
    background: var(--primary);
    color: var(--bg-dark);
    border-color: var(--primary);
}

.toggle {
    position: relative;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.toggle input {
    display: none;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-elevated);
    border-radius: 28px;
    transition: all 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
}

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

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

/* COOKING MODE */
.cooking-mode {
    padding-bottom: 0;
}

.cooking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.cooking-title-area {
    flex: 1;
}

.cooking-recipe-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

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

.btn-close-cooking {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-cooking:hover {
    color: var(--text-primary);
}

.btn-close-cooking svg {
    width: 24px;
    height: 24px;
}

.cooking-controls {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.cooking-control-btn {
    flex: 1;
    padding: 10px;
    background: var(--bg-elevated);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cooking-control-btn:hover {
    background: var(--border);
}

.cooking-control-btn.active {
    background: var(--success);
}

.cooking-control-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.cooking-content {
    height: calc(100vh - 240px);
    overflow-y: auto;
    padding: 24px 16px;
}

.current-step-card {
    padding: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--bg-dark);
    border-radius: 16px;
    margin-bottom: 24px;
}

.current-step-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
}

.current-step-text {
    font-size: 20px;
    line-height: 1.6;
}

.all-steps-section {
    margin-bottom: 24px;
}

.all-steps-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 12px;
}

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

.step-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid;
}

.step-item.current {
    background: rgba(250, 204, 21, 0.1);
    border-color: var(--primary);
}

.step-item.done {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
}

.step-item.done .step-text {
    text-decoration: line-through;
    opacity: 0.5;
}

.step-item.todo {
    background: var(--bg-card);
    border-color: var(--border);
}

.step-number {
    font-weight: 700;
    color: var(--text-primary);
}

.step-text {
    flex: 1;
    line-height: 1.5;
}

.cooking-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

.btn-nav-step {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-prev {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.btn-prev:hover {
    background: var(--border);
}

.btn-next {
    background: var(--success);
    color: white;
}

.btn-next:hover {
    background: #059669;
}

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

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

/* MODALS */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: var(--bg-card);
    border-radius: 24px;
    padding: 32px;
    z-index: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 28px;
    font-weight: 800;
}

.btn-modal-close {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-modal-close:hover {
    color: var(--text-primary);
}

.btn-modal-close svg {
    width: 24px;
    height: 24px;
}

.modal-roulette .modal-title {
    text-align: center;
    color: var(--primary);
}

.roulette-wheel {
    width: 200px;
    height: 200px;
    margin: 0 auto 24px;
    border: 8px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.roulette-wheel.spinning {
    animation: spin 2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.roulette-icon {
    font-size: 80px;
}

.roulette-result {
    text-align: center;
    margin-bottom: 24px;
}

.roulette-recipe-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.roulette-recipe-info {
    color: var(--text-muted);
    font-size: 16px;
}

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

.btn-modal-primary {
    flex: 1;
    padding: 16px;
    background: var(--primary);
    color: var(--bg-dark);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-modal-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-modal-secondary {
    padding: 16px 24px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

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

.modal-body {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

.btn-upload-photo {
    width: 100%;
    padding: 12px;
    background: var(--info);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-upload-photo:hover {
    background: #2563EB;
}

.btn-upload-photo svg {
    width: 20px;
    height: 20px;
}

/* BOTTOM NAVIGATION */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 12px;
}

.nav-item:hover {
    background: var(--bg-card);
}

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

.nav-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .recipe-title {
        font-size: 24px;
    }
    
    .action-btn {
        width: 56px;
        height: 56px;
    }
    
    .action-ai {
        width: 44px;
        height: 44px;
    }
    
    .nav-label {
        font-size: 10px;
    }
    
    .stat-badge {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* ANIMATIONS */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* THEME VARIATIONS */
body.theme-cyberpunk {
    --bg-dark: #0a0015;
    --bg-card: #1a0033;
    --primary: #00ffff;
    --secondary: #ff00ff;
}

body.theme-cottagecore {
    --bg-dark: #f5e6d3;
    --bg-card: #e8d7c3;
    --bg-elevated: #d4a373;
    --text-primary: #2d1b00;
    --text-secondary: #5c4033;
    --text-muted: #8b7355;
    --border: #c19a6b;
}

body.grandma-mode .roulette-btn,
body.grandma-mode .action-ai,
body.grandma-mode .dating-screen,
body.grandma-mode .market-screen .chef-cta {
    display: none !important;
}

/* NEW STYLES FOR V2 */

/* Action Mini Buttons */
.action-btn-mini {
    width: 40px;
    height: 40px;
    background: rgba(250, 204, 21, 0.2);
    border: 2px solid var(--primary);
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn-mini:hover {
    background: rgba(250, 204, 21, 0.3);
    transform: scale(1.1);
}

/* Icon Buttons */
.btn-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: var(--bg-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 20px;
}

.btn-icon:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.btn-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 3;
}

/* Source Badge */
.source-badge {
    font-size: 12px;
    padding: 4px 8px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    color: var(--info);
}

/* MY COOKBOOK */
.cookbook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 0 16px 24px;
}

.cookbook-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.cookbook-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.cookbook-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.cookbook-card-content {
    padding: 16px;
}

.cookbook-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.cookbook-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
}

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

.tag-ai {
    background: rgba(168, 85, 247, 0.2);
    color: var(--purple);
}

.tag-saved {
    background: rgba(236, 72, 153, 0.2);
    color: var(--accent);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 24px;
}

.btn-primary {
    padding: 12px 32px;
    background: var(--primary);
    color: var(--bg-dark);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Upload Area */
.upload-area {
    text-align: center;
    padding: 48px 24px;
    background: var(--bg-elevated);
    border: 2px dashed var(--border);
    border-radius: 16px;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    stroke-width: 2;
    color: var(--primary);
}

.upload-area h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.upload-area p {
    color: var(--text-muted);
}

/* Restaurant Result */
.restaurant-result-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
}

.restaurant-rating {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 8px;
}

/* Modal Subtitle */
.modal-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-top: -16px;
    margin-bottom: 24px;
}

/* Bottom Nav - 7 items */
.bottom-nav {
    padding: 8px 4px;
}

.nav-item {
    padding: 6px 8px;
}

.nav-icon {
    width: 22px;
    height: 22px;
}

.nav-label {
    font-size: 10px;
}

@media (max-width: 480px) {
    .cookbook-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-label {
        font-size: 9px;
    }
    
    .stats-right {
        flex-wrap: wrap;
    }
}

/* Responsive cookbook for tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .cookbook-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop cookbook layout */
@media (min-width: 1025px) {
    .cookbook-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}