/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fafafa;
    color: #111;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* ===== Language Switcher ===== */
.lang-switcher {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 100;
}

.lang-switcher select {
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: #888;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23999' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
    transition: all 0.2s;
}

.lang-switcher select:hover {
    border-color: #999;
    color: #555;
}

/* ===== Disclaimer ===== */
.disclaimer {
    font-size: 11px;
    color: #bbb;
    text-align: center;
    max-width: 560px;
    line-height: 1.6;
    padding: 0 24px;
}

.hero .disclaimer {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
}

.studio-disclaimer {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 24px;
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
}

/* ===== Hero Landing ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 80px;
    animation: fadeIn 0.8s ease;
}

.hero-title {
    font-size: clamp(48px, 10vw, 120px);
    font-weight: 900;
    letter-spacing: -3px;
    text-align: center;
    line-height: 1;
    color: #000;
}

.start-btn {
    padding: 16px 48px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    color: #111;
    background: transparent;
    border: 1.5px solid #111;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.start-btn:hover {
    background: #111;
    color: #fff;
    transform: scale(1.02);
}

/* ===== Studio ===== */
.studio {
    min-height: 100vh;
    animation: slideUp 0.6s ease;
}

.studio-header {
    padding: 32px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.studio-title {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -1px;
    color: #000;
}

.studio-body {
    max-width: 1120px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 5fr 4fr;
    gap: 48px;
    align-items: stretch;
}

/* ===== Controls ===== */
.studio-controls {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}

.optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #aaa;
}

/* Prompt Input */
.prompt-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    font-family: inherit;
    color: #111;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    resize: vertical;
    transition: border-color 0.2s;
    line-height: 1.6;
}

.prompt-input:focus {
    outline: none;
    border-color: #111;
}

.prompt-input::placeholder {
    color: #bbb;
}

/* Upload Area */
.upload-area {
    border: 1.5px dashed #d0d0d0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.upload-area:hover {
    border-color: #999;
    background: #f8f8f8;
}

.upload-area.drag-over {
    border-color: #111;
    background: #f0f0f0;
}

.upload-placeholder {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #aaa;
    font-size: 13px;
}

.upload-preview {
    position: relative;
    padding: 12px;
}

.upload-preview img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 12px;
}

.remove-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.remove-btn:hover {
    background: rgba(0,0,0,0.8);
}

/* Pill Selectors */
.pill-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    color: #666;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s;
}

.pill:hover {
    border-color: #999;
    color: #333;
}

.pill.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* Generate Button */
.generate-btn {
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: #111;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.generate-btn:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

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

.generate-btn:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ===== Result Area ===== */
.studio-result {
    position: sticky;
    top: 120px;
    order: 1;
    height: 100%;
}

.result-area {
    background: #fff;
    border: 1.5px solid #eaeaea;
    border-radius: 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: #d0d0d0;
    font-size: 13px;
    letter-spacing: 0.3px;
    padding: 48px;
}

.result-image {
    width: 100%;
    padding: 0;
}

.result-image img {
    width: 100%;
    display: block;
    border-radius: 19px;
}

/* Progress */
.result-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 48px;
}

.result-progress p {
    font-size: 13px;
    color: #aaa;
    letter-spacing: 0.3px;
    animation: pulse 2s ease infinite;
}

.progress-wave {
    display: flex;
    gap: 6px;
    align-items: center;
    height: 32px;
}

.progress-wave span {
    width: 4px;
    height: 8px;
    background: #111;
    border-radius: 4px;
    animation: wave 1.2s ease-in-out infinite;
}

.progress-wave span:nth-child(1) { animation-delay: 0s; }
.progress-wave span:nth-child(2) { animation-delay: 0.1s; }
.progress-wave span:nth-child(3) { animation-delay: 0.2s; }
.progress-wave span:nth-child(4) { animation-delay: 0.3s; }
.progress-wave span:nth-child(5) { animation-delay: 0.4s; }

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

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes wave {
    0%, 100% { height: 8px; }
    50% { height: 28px; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .studio-body {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 24px 16px;
    }

    .studio-result {
        position: static;
    }

    .hero-title {
        padding: 0 16px;
    }
}
