/* Reset e variáveis */
:root {
    --primary: #914326;
    --primary-dark: #7a351f;
    --secondary: #FFFFFF;
    --bg-primary: #F9F2E7;
    --bg-card: #FFFFFF;
    --text-primary: #222222;
    --text-secondary: #555555;
    --border: #E0DACD;
    --success: #10B981;
    --danger: #EF4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(145, 67, 38, 0.1), 0 4px 6px -2px rgba(145, 67, 38, 0.05);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.container {
    max-width: 1200px;
    width: 100%;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

.header h1 i {
    font-size: 2.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Layout principal */
.content-wrapper {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 900px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Card */
.card, .results-container, .loading-state, .error-state, .empty-state {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(145, 67, 38, 0.05);
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 25px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    border-bottom: 2px solid var(--bg-primary);
    padding-bottom: 15px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    opacity: 0.7;
    pointer-events: none;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px 12px 42px; /* Pad left for icon */
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-color: #FAFAFA;
    font-family: inherit;
    color: var(--text-primary);
}

.form-group textarea {
    padding: 12px 16px; /* No icon for textarea usually */
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(145, 67, 38, 0.1);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(145, 67, 38, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(145, 67, 38, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: rgba(145, 67, 38, 0.05);
}

/* Results Section */
.results-section {
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

/* Empty State */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    height: 100%;
    min-height: 400px;
}

.empty-icon {
    font-size: 4rem;
    color: var(--border);
    margin-bottom: 20px;
    display: block;
}

.empty-state h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
    max-width: 300px;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 80px 40px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* Results Content */
.results-container {
    padding: 0;
    overflow: hidden;
}

.results-header {
    background: #FDFDFD;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.results-header h2 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-content {
    padding: 30px;
    line-height: 1.7;
}

.results-content h3 {
    color: var(--primary);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 700;
}

.results-content h3:first-child {
    margin-top: 0;
}

.results-content ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 12px;
}

.results-content li {
    padding: 16px 20px;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid rgba(145, 67, 38, 0.05);
    transition: all 0.2s ease;
    cursor: copy;
    position: relative;
    font-size: 0.95rem;
}

.results-content li:hover {
    background: white;
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.results-content li::after {
    content: 'CLICK PARA COPIAR';
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.2s;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
}

.results-content li:hover::after {
    opacity: 1;
}

/* Error State */
.error-state {
    text-align: center;
    color: var(--danger);
    padding: 40px;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--text-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
