/**
 * Master Chef - Main Styles
 * Kitchen-friendly, mobile-first design
 */

/* Reset and Base */
#masterchef-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1F2937;
    line-height: 1.6;
}

#masterchef-app * {
    box-sizing: border-box;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Recipe Cards */
.mc-recipe-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mc-recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Buttons */
.mc-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    min-width: 48px;
}

.mc-btn-primary {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

.mc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.4);
}

.mc-btn-secondary {
    background: #F3F4F6;
    color: #374151;
}

.mc-btn-secondary:hover {
    background: #E5E7EB;
}

.mc-btn-success {
    background: #10B981;
    color: white;
}

.mc-btn-danger {
    background: #EF4444;
    color: white;
}

/* Large touch targets for kitchen use */
.mc-btn-large {
    padding: 20px 40px;
    font-size: 1.3em;
    min-height: 60px;
}

/* Timer Display */
.mc-timer {
    text-align: center;
    padding: 30px;
}

.mc-timer-display {
    font-size: 5em;
    font-weight: bold;
    color: #FF6B6B;
    font-variant-numeric: tabular-nums;
    margin: 20px 0;
}

.mc-timer-progress {
    width: 100%;
    height: 30px;
    background: #E5E7EB;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.mc-timer-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10B981, #059669);
    transition: width 1s linear;
    border-radius: 15px;
}

.mc-timer-progress-bar.warning {
    background: linear-gradient(90deg, #F59E0B, #D97706);
}

.mc-timer-progress-bar.danger {
    background: linear-gradient(90deg, #EF4444, #DC2626);
    animation: pulse 1s infinite;
}

/* Circular Timer */
.mc-timer-circular {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.mc-timer-circular svg {
    transform: rotate(-90deg);
}

.mc-timer-circular circle {
    fill: none;
    stroke-width: 15;
    transition: stroke-dashoffset 1s linear;
}

.mc-timer-circular .bg {
    stroke: #E5E7EB;
}

.mc-timer-circular .progress {
    stroke: #FF6B6B;
    stroke-linecap: round;
}

.mc-timer-time {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    font-weight: bold;
    color: #FF6B6B;
}

/* Ingredient Checklist */
.mc-ingredient-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mc-ingredient-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #E5E7EB;
    font-size: 1.1em;
    min-height: 60px;
}

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

.mc-ingredient-checkbox {
    width: 30px;
    height: 30px;
    margin-right: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

.mc-ingredient-item.checked {
    opacity: 0.5;
    text-decoration: line-through;
}

.mc-ingredient-icon {
    font-size: 1.5em;
    margin-right: 10px;
    flex-shrink: 0;
}

.mc-ingredient-name {
    flex: 1;
}

.mc-ingredient-quantity {
    font-weight: bold;
    color: #6B7280;
    margin-left: 10px;
}

/* Step Display */
.mc-step-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin: 20px 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.mc-step-header {
    text-align: center;
    margin-bottom: 30px;
}

.mc-step-icon {
    font-size: 6em;
    margin-bottom: 20px;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

.mc-step-title {
    font-size: 2.5em;
    color: #1F2937;
    margin: 0 0 10px 0;
}

.mc-step-number {
    font-size: 1.2em;
    color: #6B7280;
    margin: 0;
}

.mc-step-instruction {
    font-size: 1.4em;
    line-height: 1.8;
    color: #374151;
    text-align: center;
    margin: 30px 0;
    padding: 25px;
    background: #F9FAFB;
    border-radius: 15px;
}

.mc-step-tip {
    background: #FEF3C7;
    border-left: 5px solid #F59E0B;
    padding: 20px;
    border-radius: 10px;
    margin: 25px 0;
}

.mc-step-tip strong {
    color: #D97706;
    font-size: 1.1em;
}

.mc-step-visual-cue {
    background: #DBEAFE;
    border-left: 5px solid #3B82F6;
    padding: 20px;
    border-radius: 10px;
    margin: 25px 0;
}

.mc-step-visual-cue strong {
    color: #1E40AF;
    font-size: 1.1em;
}

/* Step Controls */
.mc-step-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Completion Screen */
.mc-completion {
    text-align: center;
    padding: 60px 30px;
}

.mc-completion-icon {
    font-size: 8em;
    margin-bottom: 30px;
    animation: pulse 1s ease infinite;
}

.mc-completion-title {
    font-size: 3em;
    color: #10B981;
    margin: 0 0 20px 0;
}

.mc-completion-message {
    font-size: 1.5em;
    color: #6B7280;
    margin-bottom: 40px;
}

.mc-rating-container {
    margin: 30px 0;
}

.mc-rating-emojis {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.mc-rating-emoji {
    font-size: 4em;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.4;
    min-width: 80px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-rating-emoji:hover,
.mc-rating-emoji.selected {
    opacity: 1;
    transform: scale(1.2);
}

/* Modal */
.mc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    overflow-y: auto;
}

.mc-modal-content {
    background: white;
    max-width: 1000px;
    margin: 30px auto;
    border-radius: 20px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mc-timer-display {
        font-size: 3.5em;
    }

    .mc-step-title {
        font-size: 1.8em;
    }

    .mc-step-instruction {
        font-size: 1.2em;
    }

    .mc-btn {
        padding: 16px 24px;
        font-size: 1em;
    }

    .mc-btn-large {
        padding: 18px 30px;
        font-size: 1.1em;
    }

    .mc-step-container {
        padding: 25px;
    }

    .mc-rating-emoji {
        font-size: 3em;
        min-width: 60px;
        min-height: 60px;
    }

    .mc-completion-icon {
        font-size: 5em;
    }

    .mc-completion-title {
        font-size: 2em;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .mc-dark-mode #masterchef-app {
        color: #E5E7EB;
    }

    .mc-dark-mode .mc-recipe-card,
    .mc-dark-mode .mc-step-container,
    .mc-dark-mode .mc-modal-content {
        background: #1F2937;
        color: #E5E7EB;
    }

    .mc-dark-mode .mc-step-instruction {
        background: #374151;
        color: #E5E7EB;
    }
}

/* Print Styles */
@media print {
    .mc-timer,
    .mc-step-controls,
    .mc-btn,
    .mc-modal {
        display: none !important;
    }

    .mc-recipe-card {
        break-inside: avoid;
    }
}

/* Loading State */
.mc-loading {
    text-align: center;
    padding: 60px;
    font-size: 1.2em;
    color: #9CA3AF;
}

.mc-loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

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

/* Wake Lock Indicator */
.mc-wake-lock-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9998;
}
