/* NoPixel Inspired UI */
:root {
    --primary: #ff5e63;
    --primary-dark: #e04e53;
    --primary-light: #ff7b7f;
    --secondary: #2a2e35;
    --secondary-dark: #1f2228;
    --secondary-light: #3a3f4b;
    --accent: #4a90e2;
    --accent-hover: #3a7bc8;
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
    --text: #f0f0f0;
    --text-muted: #a0a0a0;
    --text-dark: #333;
    --background: rgba(30, 33, 40, 0.98);
    --surface: rgba(42, 46, 53, 0.95);
    --border: rgba(255, 255, 255, 0.1);
    --border-radius: 4px;
    --border-radius-lg: 8px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 50px;
    --footer-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: transparent;
    color: var(--text);
    line-height: 1.6;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* Main Container */
#cooking-container {
    position: absolute;
    /*top: 50%;
    left: 50%;*/
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out forwards;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: var(--header-height);
    background: linear-gradient(90deg, var(--secondary-dark), var(--secondary));
    border-bottom: 1px solid var(--border);
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.8;
}

.header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.header h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0.5;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 5px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.close-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
}

.close-btn:hover {
    color: white;
    transform: rotate(90deg);
}

.close-btn:hover::before {
    opacity: 1;
}

.close-btn i {
    position: relative;
    z-index: 1;
}

/* Recipes List */
.recipes-container {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
    background: var(--background);
    background-image: 
        linear-gradient(rgba(255,255,255,0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.01) 1px, transparent 1px);
    background-size: 20px 20px;
}

.recipe-card {
    background: rgba(42, 46, 53, 0.8);
    border-radius: var(--border-radius);
    padding: 12px 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.recipe-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0%;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    transition: var(--transition);
}

.recipe-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

.recipe-card:hover::before {
    height: 100%;
}

.recipe-card h3 {
    color: var(--text);
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.recipe-card h3::before {
    content: '🍳';
    margin-right: 8px;
    font-size: 1.1em;
}

.recipe-ingredients {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ingredient-tag {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--border);
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.ingredient-tag i {
    color: var(--accent);
    font-size: 0.7em;
}

.ingredient-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.ingredient-tag i {
    font-size: 0.7rem;
}

.no-recipes {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-recipes i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-recipes p {
    margin-bottom: 10px;
}

.no-recipes .hint {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Recipe Details */
.recipe-details {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--background);
    background-image: 
        linear-gradient(rgba(255,255,255,0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.01) 1px, transparent 1px);
    background-size: 20px 20px;
}

.recipe-details h3 {
    color: var(--text);
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
    font-weight: 500;
}

.recipe-details h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.ingredients-list {
    background: rgba(42, 46, 53, 0.8);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 20px;
    flex: 1;
    border: 1px solid var(--border);
    backdrop-filter: blur(5px);
}

.ingredient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px;
    margin: 8px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 1px solid transparent;
}

.ingredient-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--border);
    transform: translateX(3px);
}

.ingredient-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text);
}

.ingredient-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--secondary-dark), var(--secondary));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.9rem;
    border: 1px solid var(--border);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.ingredient-amount {
    background: rgba(0, 0, 0, 0.3);
    color: var(--accent);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid var(--border);
}

/* Buttons */
.actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.btn:hover::before {
    transform: translateX(100%);
}

.btn i {
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
    flex: 1;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), var(--accent));
    border-radius: 3px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--primary-light), var(--accent-hover));
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

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

.recipe-card {
    animation: fadeIn 0.3s ease forwards;
    opacity: 0;
}

.ingredient-item {
    animation: slideInRight 0.3s ease forwards;
    opacity: 0;
}

/* Responsive */
@media (max-width: 768px) {
    #cooking-container {
        width: 95%;
        height: 90vh;
        max-width: none;
    }
    
    .recipe-card {
        padding: 12px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.8rem;
    }
    
    .header h2 {
        font-size: 1rem;
    }
    
    .recipe-details h3 {
        font-size: 1.1rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    #cooking-container {
        width: 95%;
        height: 90vh;
    }
    
    .recipe-card {
        padding: 12px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.recipe-card, .ingredient-item {
    animation: fadeIn 0.3s ease forwards;
    opacity: 0;
}

.ingredient-item {
    animation-delay: calc(var(--i) * 0.05s);
}
