.generator-hero {
    text-align: center;
    margin-bottom: 48px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: white;
    text-shadow: 
        -3px -3px 0 #000,
        3px -3px 0 #000,
        -3px 3px 0 #000,
        3px 3px 0 #000;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto;
}

.generator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.generator-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-card {
    background: var(--color-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.form-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: white;
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.form-label svg {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.prompt-textarea {
    width: 100%;
    min-height: 140px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: var(--transition);
}

.prompt-textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
}

.prompt-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 8px;
}

.generate-button {
    width: 100%;
    padding: 18px 32px;
    background: white;
    border: 4px solid #000;
    border-radius: var(--radius-lg);
    color: #000;
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 5px 0 #000;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.generate-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 0 #000;
}

.generate-button:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #000;
}

.generate-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.generate-button svg {
    width: 24px;
    height: 24px;
}

.preview-card {
    background: var(--color-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: calc(var(--header-height) + 24px);
}

.preview-header {
    text-align: center;
    margin-bottom: 20px;
}

.preview-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: white;
    text-shadow: 
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000;
}

.preview-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--color-text-muted);
}

.preview-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}

.preview-placeholder p {
    font-size: 0.9rem;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preview-loading {
    position: absolute;
    inset: 0;
    background: rgba(13, 71, 161, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border-radius: var(--radius-lg);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    color: white;
    font-weight: 600;
}

.preview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.action-btn.primary {
    background: white;
    border: 3px solid #000;
    color: #000;
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 0 #000;
}

.action-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #000;
}

.action-btn.primary:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #000;
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 900px) {
    .generator-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .preview-card {
        position: static;
        order: -1;
    }

    .preview-frame {
        max-height: 350px;
        aspect-ratio: auto;
    }
}

@media (max-width: 600px) {
    .generator-hero {
        margin-bottom: 32px;
    }

    .form-card {
        padding: 20px;
    }

    .preview-card {
        padding: 20px;
    }

    .preview-actions {
        grid-template-columns: 1fr;
    }

    .generate-button {
        font-size: 1.1rem;
        padding: 16px 24px;
    }
}
