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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    padding: 40px;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.app-store-header-btn {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    opacity: 0.9;
    transition: opacity 0.2s;
    vertical-align: middle;
}

.app-store-header-btn:hover {
    opacity: 1;
}

/* The PNG badge is 400x400 with ~30% padding; crop to just the badge content */
.app-store-badge-img {
    width: 150px;
    height: 50px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.app-store-badge-img--header {
    width: 120px;
    height: 40px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

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

button {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.loading {
    text-align: center;
    padding: 40px;
    display: none;
}

.loading.active {
    display: block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 0.95rem;
}

.result {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    display: none;
}

.result.active {
    display: block;
}

.platform-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.platform-youtube {
    background: #ff0000;
    color: white;
}

.platform-tiktok {
    background: #000000;
    color: white;
}

.platform-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.platform-website {
    background: #667eea;
    color: white;
}

.recipe-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
}

.recipe-title-link {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.recipe-title-link:hover {
    color: #667eea;
}

.recipe-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-separator {
    color: #999;
}

.recipe-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.thumbnail-link {
    display: block;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.thumbnail-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.thumbnail-link::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
}

.thumbnail-link:hover::after {
    opacity: 0.9;
}

.recipe-thumbnail {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 12px;
    font-weight: 600;
}

.ingredients-list, .steps-list {
    list-style-position: inside;
    padding-left: 0;
}

.ingredients-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}

.ingredients-list li:last-child {
    border-bottom: none;
}

.steps-list {
    counter-reset: step-counter;
    list-style: none;
}

.steps-list li {
    counter-increment: step-counter;
    padding: 12px 0;
    padding-left: 40px;
    position: relative;
    color: #444;
    line-height: 1.6;
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.source-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

.source-link:hover {
    background: #667eea;
    color: white;
}

.error {
    display: none;
    padding: 16px;
    background: #fee;
    border-left: 4px solid #f44;
    border-radius: 8px;
    color: #c33;
    margin-top: 20px;
}

.error.active {
    display: block;
}

.supported-platforms {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.supported-platforms h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.platforms {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.platform-icon {
    font-size: 0.85rem;
    color: #888;
}

.save-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: none;
}

.save-button:hover {
    background: #667eea;
    color: white;
}

.bookmark-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.modal-text {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.app-store-badges {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.app-store-badge {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.7;
}

.app-store-badge:hover {
    transform: scale(1.05);
    opacity: 1;
}

.coming-soon-badge {
    display: inline-block;
    background: #f0f0f0;
    color: #888;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 10px;
}
