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

body {
    font-family: 'Space Mono', monospace;
    background: #faf9f6;
    color: #2c2c2c;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: #8b4513;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    color: #6b5b47;
    opacity: 0.8;
}

.main {
    display: grid;
    gap: 3rem;
}

.generator-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #e8e4d9;
}

.prompt-area {
    margin-bottom: 1.5rem;
}

#promptInput {
    width: 100%;
    padding: 1rem;
    border: 2px solid #d4c4a8;
    border-radius: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    background: #fefdfb;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#promptInput:focus {
    outline: none;
    border-color: #8b4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.style-select,
.aspect-select {
    padding: 0.75rem 1rem;
    border: 2px solid #d4c4a8;
    border-radius: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    flex: 1;
    min-width: 150px;
}

.style-select:focus,
.aspect-select:focus {
    outline: none;
    border-color: #8b4513;
}

.generate-btn {
    padding: 0.75rem 2rem;
    background: #8b4513;
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.generate-btn:hover:not(:disabled) {
    background: #a0521f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
}

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

.btn-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

.generate-btn.loading .btn-text {
    opacity: 0.7;
}

.generate-btn.loading .btn-spinner {
    display: inline-block;
}

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

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.image-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 3px solid #e8e4d9;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.image-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.image-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.image-info {
    padding: 1.5rem;
}

.image-prompt {
    font-size: 0.9rem;
    color: #6b5b47;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.image-style {
    font-size: 0.8rem;
    color: #8b4513;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: #8b4513;
    border: 2px solid #8b4513;
    border-radius: 6px;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.download-btn:hover {
    background: #8b4513;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #a0a0a0;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.empty-state small {
    font-size: 0.9rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .style-select,
    .aspect-select,
    .generate-btn {
        width: 100%;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
}

