:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --kakao-color: #fee500;
    --bg-color: #f7f9fc;
    --card-bg: #ffffff;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: 50px;
}

header {
    background: linear-gradient(135deg, var(--primary-color), #ee5253);
    color: white;
    padding: 2.5rem 1rem;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.container {
    max-width: 1000px;
    margin: -30px auto 0;
    padding: 0 20px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.hidden {
    display: none !important;
}

.mt-1 { margin-top: 1.5rem; }

/* Transcript Styles */
.transcript-container {
    background: #2d3436;
    color: #dfe6e9;
    padding: 1.5rem;
}

.transcript-container h3 { color: #fab1a0; margin-bottom: 0; }

.transcript-box {
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.8;
    white-space: pre-wrap;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    border-left: 3px solid var(--secondary-color);
}

.text-btn {
    background: none;
    border: 1px solid #636e72;
    color: #b2bec3;
    padding: 4px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
}

.text-btn:hover { background: rgba(255,255,255,0.1); color: white; }

/* AI Cooking Animation */
#ai-loading-container {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed var(--secondary-color);
    margin-top: 1rem;
}

.ai-chef-animation {
    font-size: 3rem;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.chef-hat {
    animation: bounce 1s infinite;
}

.cooking-pot {
    width: 60px;
    height: 40px;
    background: #555;
    margin: 0 auto;
    border-radius: 0 0 20px 20px;
    position: relative;
}

.cooking-pot::before {
    content: '♨️';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    animation: steam 1.5s infinite;
    font-size: 1.5rem;
}

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

@keyframes steam {
    0% { opacity: 0; transform: translate(-50%, 0) scale(0.5); }
    50% { opacity: 1; transform: translate(-50%, -20px) scale(1.2); }
    100% { opacity: 0; transform: translate(-50%, -40px) scale(1.5); }
}

.ai-status-text {
    font-weight: 700;
    color: var(--secondary-color);
    margin-top: 15px;
    font-size: 1.1rem;
}

/* Progress Bar */
.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
}

.progress-bar-bg {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
}

#progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), #45aaf2);
    transition: width 0.3s ease;
}

/* Video Info Section */
.video-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

#video-thumbnail {
    width: 200px;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
}

.video-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.hint {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.9rem;
}

/* AI Button */
.ai-btn {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    width: 100%;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.ai-btn:hover { transform: translateY(-2px); }
.ai-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Editor Grid */
.editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .editor-grid { grid-template-columns: 1fr; }
}

.field { margin-bottom: 1.5rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.5rem; }

textarea, input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

textarea:focus { border-color: var(--secondary-color); outline: none; }

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 1.5rem;
}

.primary-btn, .kakao-btn {
    padding: 15px;
    border-radius: 8px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

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

.kakao-btn {
    background-color: var(--kakao-color);
    color: #3c1e1e;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s infinite linear;
}

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

/* Preview */
.recipe-preview {
    background: white;
    border: 1px solid #eee;
    padding: 20px;
    min-height: 400px;
    border-radius: 8px;
}

.input-group {
    display: flex;
    gap: 10px;
}

#analyze-btn {
    background-color: var(--text-main);
    color: white;
    white-space: nowrap;
    padding: 0 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

#status-msg {
    margin-top: 1rem;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

#status-msg.error { background: #fee; color: #e74c3c; }
#status-msg.loading { background: #eef; color: #3498db; }
