/* Variáveis de Cores - Tema Claro */
:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-card: #FFFFFF;
    --text-primary: #1E1E1E;
    --text-secondary: #4A4A4A;
    --text-muted: #6C757D;
    --border-color: #E0E0E0;
    --border-light: rgba(30, 30, 30, 0.08);
    --shadow-sm: 0 2px 8px rgba(30, 30, 30, 0.06);
    --shadow-md: 0 4px 16px rgba(30, 30, 30, 0.08);
    --shadow-lg: 0 8px 32px rgba(30, 30, 30, 0.12);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container Principal */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 80px; /* Espaço para header */
    padding-bottom: 60px; /* Espaço para footer */
}

/* Componente Glass (fundo branco com borda sutil) */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.glass-card:hover {
    box-shadow: var(--shadow-lg);
}

/* Loader/Spinner */
.loader-spinner {
    border: 4px solid var(--border-color);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Layout Responsivo */
.content-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Login Container */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 32px;
    border-radius: 24px;
}

.login-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: 32px;
    color: var(--text-primary);
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form-input:focus {
    border-color: var(--text-primary);
    background: var(--bg-primary);
}

.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none;
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s ease;
}

.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea:focus {
    border-color: var(--text-primary);
    background: var(--bg-primary);
}

/* Error Message */
.error-message {
    color: #DC2626;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    margin-bottom: 8px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    background: var(--text-primary);
    color: var(--bg-primary);
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 30, 30, 0.2);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Generator Container */
.generator-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
    padding: 20px;
}

.generator-card {
    width: 100%;
    max-width: 600px;
    padding: 32px;
    border-radius: 32px;
}

/* Header Section */
.generator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.header-badge {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.btn-logout {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #DC2626;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: rgba(220, 38, 38, 0.1);
}

/* Image Display */
.image-container {
    aspect-ratio: 1;
    border-radius: 20px;
    margin-bottom: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
}

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

.image-placeholder {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

/* Prompt Section */
.prompt-section {
    margin-bottom: 16px;
}

.prompt-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Download Section */
.download-section {
    margin-bottom: 16px;
}

.btn-download {
    width: 100%;
    padding: 12px 24px;
    border-radius: 12px;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-download:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 30, 30, 0.15);
}

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

.btn-download svg {
    transition: transform 0.2s ease;
}

.btn-download:hover svg {
    transform: translateY(2px);
}

/* Disclaimer Section */
.disclaimer-section {
    margin-top: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

.disclaimer-text {
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: justify;
}

.disclaimer-text strong {
    color: var(--text-primary);
    font-weight: 700;
}

.disclaimer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
}

.disclaimer-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.disclaimer-links a:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    text-decoration: none;
}

.disclaimer-links .separator {
    color: var(--text-muted);
    font-weight: 400;
}

/* Responsive Design */

/* Tablets */
@media (min-width: 768px) {
    .app-container {
        padding-top: 90px;
        padding-bottom: 80px;
    }
    
    .login-card {
        padding: 48px 40px;
    }
    
    .generator-card {
        padding: 40px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .app-container {
        padding-top: 100px;
        padding-bottom: 100px;
    }
    
    .generator-card {
        max-width: 700px;
    }
}

/* Mobile Small */
@media (max-width: 375px) {
    .login-title {
        font-size: 24px;
    }
    
    .login-card {
        padding: 32px 24px;
    }
    
    .generator-card {
        padding: 24px;
        border-radius: 24px;
    }
}

/* Animações Sutis */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Scrollbar customizada (opcional) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}