/* ===== VARIABLES ===== */
:root {
    --primary-green: #4a7c59;
    --secondary-green: #6b8e6b;
    --light-green: #f0f8f0;
    --pale-green: #f8fdf8;
    --dark-green: #2d4a2d;
    --accent-green: #5a8c5a;
    
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --gray: #666666;
    --dark-gray: #333333;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* ===== GLOBAL STYLES ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--pale-green) 0%, var(--light-green) 100%);
    color: var(--dark-green);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
}

.grid-container.full {
    max-width: 100%;
    padding: 0;
}

/* ===== HEADER ===== */
.app-header {
    background: var(--white);
    border-bottom: 1px solid rgba(74, 124, 89, 0.1);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

.app-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-green);
    margin: 0;
    line-height: 1.2;
}

.app-subtitle {
    color: var(--secondary-green);
    margin: 0;
    font-size: 0.9rem;
    font-weight: 400;
}

.badge.success {
    background: var(--accent-green);
    color: white;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

/* ===== CARDS ===== */
.control-card,
.result-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    height: fit-content;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: white;
    padding: 2rem;
    text-align: center;
}

.card-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.card-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.card-body {
    padding: 2.5rem;
}

/* ===== FORM STYLES ===== */
.form-section {
    margin-bottom: 2.5rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: var(--dark-green);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.icon {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

input[type="text"],
input[type="password"],
textarea,
select {
    border: 2px solid #e0e0e0;
    border-radius: var(--radius);
    padding: 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.help-text {
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* ===== SECTION TITLES ===== */
.section-title {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-green);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-green);
}

/* ===== EXAMPLE PROMPTS ===== */
.example-prompts {
    margin-top: 1rem;
}

.example-label {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.75rem;
}

.example-btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    border-color: var(--secondary-green);
    color: var(--secondary-green);
}

.example-btn:hover {
    background: var(--secondary-green);
    color: white;
}

/* ===== STEPS SLIDER ===== */
.steps-section {
    margin-top: 1.5rem;
}

.slider {
    background: #e0e0e0;
    border-radius: 50px;
    height: 8px;
    margin: 1rem 0;
}

.slider::-webkit-slider-thumb {
    background: var(--primary-green);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    border: none;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    background: var(--primary-green);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    border: none;
    cursor: pointer;
}

/* ===== BUTTONS ===== */
.button {
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.button.success {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    color: white;
}

.button.success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.button.secondary {
    background: var(--secondary-green);
    color: white;
}

.button.warning {
    background: #ff9500;
    color: white;
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== RESULT STATES ===== */
.result-card {
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-state {
    width: 100%;
    padding: 2rem;
    text-align: center;
}

/* ===== PLACEHOLDER STATE ===== */
.placeholder-content {
    max-width: 400px;
    margin: 0 auto;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.placeholder-content h3 {
    color: var(--dark-green);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.placeholder-content p {
    color: var(--gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.placeholder-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature {
    text-align: center;
}

.feature strong {
    display: block;
    color: var(--primary-green);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.feature span {
    color: var(--gray);
    font-size: 0.8rem;
}

/* ===== LOADING STATE ===== */
.loading-content {
    max-width: 300px;
    margin: 0 auto;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(74, 124, 89, 0.1);
    border-left: 4px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

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

.loading-content h4 {
    color: var(--dark-green);
    margin-bottom: 0.5rem;
}

.loading-content p {
    color: var(--gray);
    margin-bottom: 2rem;
}

.progress {
    background: rgba(74, 124, 89, 0.1);
    border-radius: 50px;
    height: 8px;
    overflow: hidden;
}

.progress-meter {
    background: linear-gradient(90deg, var(--primary-green), var(--accent-green));
    height: 100%;
    transition: width 0.3s ease;
    width: 0%;
}

/* ===== SUCCESS STATE ===== */
.image-container {
    position: relative;
    margin-bottom: 2rem;
}

.generated-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.image-container:hover .image-overlay {
    opacity: 1;
}

.image-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.image-details {
    background: var(--light-green);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: left;
}

.image-details h4 {
    color: var(--dark-green);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.details-grid {
    display: grid;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item strong {
    color: var(--primary-green);
    font-size: 0.85rem;
    font-weight: 600;
}

.detail-item span {
    color: var(--dark-gray);
    font-size: 0.9rem;
    word-break: break-word;
}

/* ===== FOOTER ===== */
.app-footer {
    background: var(--white);
    border-top: 1px solid rgba(74, 124, 89, 0.1);
    padding: 2rem 0;
    margin-top: 3rem;
}

.app-footer p {
    margin: 0.5rem 0;
    color: var(--gray);
    font-size: 0.9rem;
}

.app-footer a {
    color: var(--primary-green);
    text-decoration: none;
    transition: var(--transition);
}

.app-footer a:hover {
    color: var(--accent-green);
    text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 768px) {
    .main-content {
        padding: 2rem 0;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .card-header {
        padding: 1.5rem;
    }
    
    .app-title {
        font-size: 1.5rem;
    }
    
    .image-actions {
        flex-direction: column;
    }
    
    .placeholder-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-1 {
    margin-top: 1rem !important;
}

.hidden {
    display: none !important;
}