/* Variáveis base e reset padrão premium */
:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --border-color: #30363d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    --accent-hover: #1f6feb;
    --success-color: #238636;
    --error-color: #f85149;
    --font-family: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #58a6ff, #a371f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Card Principal da Web App */
.main-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.input-group {
    margin-bottom: 1.5rem;
}

.group-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.required {
    color: var(--error-color);
}

.optional {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 400;
}

/* Área de Upload Customizada Glassmorphism-likeso */
.file-drop-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 90px;
    padding: 1rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    overflow: hidden;
}

.file-drop-area:hover, .file-drop-area.is-active {
    background-color: rgba(88, 166, 255, 0.05);
    border-color: var(--accent-color);
}

.file-drop-area.has-file {
    border-style: solid;
    border-color: var(--success-color);
    background-color: rgba(35, 134, 54, 0.1);
}

.file-msg {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    pointer-events: none;
    transition: color 0.2s ease;
}

.file-drop-area.has-file .file-msg {
    color: var(--text-primary);
    font-weight: 500;
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    cursor: pointer;
    opacity: 0;
}

/* Botão de Ação */
.action-area {
    margin-top: 2rem;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--success-color);
    border: 1px solid rgba(240, 246, 252, 0.1);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover:not(:disabled) {
    background-color: #2ea043;
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background-color: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Spinner animado */
.loader-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mensagens de status informativas */
.status-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
    text-align: center;
    font-weight: 500;
}

.status-message.success {
    display: block;
    background-color: rgba(35, 134, 54, 0.15);
    color: #3fb950;
    border: 1px solid rgba(35, 134, 54, 0.4);
}

.status-message.error {
    display: block;
    background-color: rgba(248, 81, 73, 0.15);
    color: #ff7b72;
    border: 1px solid rgba(248, 81, 73, 0.4);
}
