﻿:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --droid-sage: #87a96b; /* Main sage green - like fresh herbs */
    --droid-thyme: #9cae82; /* Lighter thyme green */
    --droid-basil: #6b8e5a; /* Deeper basil green */
    --droid-green: #27ae60; /* Keep for success states */
    --droid-orange: #d4941e; /* More golden, like turmeric */
    --success-color: #6b8e5a; /* Use basil green for success */
    --warning-color: #d4941e;
    --error-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 8px rgba(0,0,0,0.15);
    --gradient-droid: linear-gradient(135deg, var(--primary-color), var(--droid-sage));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--gradient-droid);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

    .header .container {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

.header-content {
    text-align: center;
    flex: 1;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin: 0;
}

.header p {
    opacity: 0.9;
    margin-top: 0.5rem;
}

.header-logo {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

    .header-logo:hover {
        opacity: 1;
    }

    .header-logo.left {
        left: 20px;
    }

    .header-logo.right {
        right: 20px;
    }

/* Droid-specific styling */
.droid-subtitle {
    font-style: italic;
    color: var(--droid-sage);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Navigation */
.nav {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

    .nav ul {
        list-style: none;
        display: flex;
        justify-content: center;
        gap: 2rem;
    }

    .nav a {
        text-decoration: none;
        color: var(--text-color);
        font-weight: 500;
        padding: 0.5rem 1rem;
        border-radius: 5px;
        transition: all 0.3s ease;
    }

        .nav a:hover {
            background: var(--light-bg);
            color: var(--droid-sage);
        }

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.card-header {
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

    .card-header h2 {
        color: var(--primary-color);
        font-size: 1.5rem;
        font-weight: 600;
    }

    .card-header h3 {
        color: var(--droid-sage);
        font-size: 1.3rem;
        font-weight: 600;
    }

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

    .form-input:focus {
        outline: none;
        border-color: var(--droid-sage);
        box-shadow: 0 0 0 3px rgba(135, 169, 107, 0.1);
    }

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--droid-sage);
    color: white;
}

    .btn-primary:hover {
        background: var(--droid-basil);
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    .btn-primary:disabled {
        background: #6c757d;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

    .btn-secondary:hover {
        background: #c0392b;
    }

/* Access Status */
.access-status {
    background: var(--gradient-droid);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.countdown {
    font-size: 1rem;
    font-weight: 600;
}

/* Progress Tracking Styles */
.progress-container {
    margin: 2rem 0;
}

.progress-content {
    padding: 1.5rem;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-bar {
    flex: 1;
    height: 20px;
    background: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--droid-sage), var(--success-color));
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
}

    .progress-fill::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
        animation: shimmer 2s infinite;
    }

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}

.progress-percentage {
    font-weight: 600;
    color: var(--droid-sage);
    min-width: 40px;
}

.mission-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--droid-sage);
}

.status-icon {
    font-size: 1.5rem;
}

.status-text {
    font-weight: 600;
    color: var(--primary-color);
    flex: 1;
}

.mission-details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    margin: 0.5rem 0;
    border-radius: 5px;
    transition: all 0.3s ease;
}

    .detail-item.active {
        background: rgba(135, 169, 107, 0.1);
        border-left: 3px solid var(--droid-sage);
    }

    .detail-item.completed {
        background: rgba(107, 142, 90, 0.1);
        border-left: 3px solid var(--success-color);
    }

.step-icon {
    font-size: 1rem;
    min-width: 20px;
}

.step-text {
    color: var(--text-color);
}

.detail-item.completed .step-text {
    color: var(--success-color);
}

.detail-item.active .step-text {
    color: var(--droid-sage);
    font-weight: 600;
}

/* Technical Details */
.technical-details {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 1rem;
}

    .technical-details summary {
        cursor: pointer;
        font-weight: 600;
        color: var(--primary-color);
        padding: 0.5rem;
    }

        .technical-details summary:hover {
            color: var(--droid-sage);
        }

.tech-log {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 1rem;
    padding: 0.5rem;
    background: #ffffff;
    border-radius: 3px;
    border: 1px solid #e9ecef;
}

.log-entry {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    padding: 0.25rem 0;
    color: #495057;
    border-bottom: 1px solid #f8f9fa;
}

    .log-entry:last-child {
        border-bottom: none;
    }

.timestamp {
    color: var(--droid-sage);
    font-weight: 600;
}

/* Mission Success Styling */
.mission-success {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--success-color), var(--droid-thyme));
    color: white;
    border-radius: 8px;
}

.success-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.success-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.success-details {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Recipe Display */
.recipe-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 2rem;
}

.recipe-main {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.recipe-header {
    padding: 2rem;
    background: var(--gradient-droid);
    color: white;
}

.recipe-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.recipe-meta {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.recipe-content {
    padding: 2rem;
}

.recipe-section {
    margin-bottom: 2rem;
}

    .recipe-section h3 {
        color: var(--primary-color);
        font-size: 1.3rem;
        margin-bottom: 1rem;
        border-bottom: 2px solid var(--light-bg);
        padding-bottom: 0.5rem;
    }

.ingredients-list {
    list-style: none;
    padding-left: 0;
}

    .ingredients-list li {
        position: relative;
        padding-left: 25px;
        margin-bottom: 8px;
    }

    .ingredients-list.css-diamonds li::before {
        content: "";
        width: 8px;
        height: 8px;
        background-color: var(--droid-sage);
        transform: rotate(45deg);
        position: absolute;
        left: 8px;
        top: 8px;
    }

.instructions-list {
    list-style: none;
    counter-reset: step-counter;
}

    .instructions-list li {
        counter-increment: step-counter;
        padding: 1rem 0;
        border-bottom: 1px solid #f0f0f0;
        position: relative;
        padding-left: 3rem;
        line-height: 1.6;
    }

        .instructions-list li:before {
            content: counter(step-counter);
            background: var(--droid-sage);
            color: white;
            border-radius: 50%;
            width: 2rem;
            height: 2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            position: absolute;
            left: 0;
            top: 1rem;
            font-weight: 600;
            font-size: 0.9rem;
        }

.recipe-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recipe-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.recipe-info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.cost-display {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid var(--droid-orange);
}

.cost-amount {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--droid-orange);
}

.attribution {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--droid-sage);
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
}

    .attribution strong {
        color: var(--primary-color);
    }

    .attribution a {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-all;
        color: var(--droid-sage);
        text-decoration: none;
    }

        .attribution a:hover {
            text-decoration: underline;
        }

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Loading (legacy, keeping for compatibility) */
.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--droid-sage);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Debug Panel Styles */
.debug-panel {
    margin-top: 2rem;
    border: 2px solid #ff6b35;
    border-radius: 8px;
    background: #1a1a1a;
    padding: 1rem;
}

.debug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.debug-toggle {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.debug-content {
    display: none;
}

    .debug-content.show {
        display: block;
    }

.debug-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #666;
    border-radius: 4px;
}

.debug-info {
    background: #2a2a2a;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header-logo {
        width: 40px;
        height: 40px;
    }

        .header-logo.left {
            left: 10px;
        }

        .header-logo.right {
            right: 10px;
        }

    .recipe-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .recipe-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .progress-bar-container {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .mission-status {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .detail-item {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .header-logo {
        width: 30px;
        height: 30px;
    }

    .header h1 {
        font-size: 1.8rem;
    }
}
