/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #FFFFFF;
    color: #2E2E2E;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
}

/* Sidebar - Design moderno inspirado na Aon */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1A1A1A 0%, #2E2E2E 100%);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    border-right: 1px solid #E4E4E4;
}

.sidebar-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 1px solid #404040;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-header img {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.sidebar-header h2 {
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.sidebar-header p {
    color: #B0B0B0;
    font-size: 0.9rem;
    font-weight: 400;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    flex: 1;
}

.menu-item {
    margin: 0.25rem 1rem;
}

.menu-item a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #B0B0B0;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.menu-item a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    transform: translateX(4px);
}

.menu-item.active a {
    background: linear-gradient(135deg, #DA291C, #FF6B6B);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(218, 41, 28, 0.3);
}

.menu-item.active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #FFFFFF;
    border-radius: 0 2px 2px 0;
}

.menu-item i {
    margin-right: 1rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #404040;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-footer p {
    color: #808080;
    font-size: 0.8rem;
}

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #FAFAFA;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header - Hero section inspirado na Aon */
.header {
    background: linear-gradient(135deg, #DA291C 0%, #B71C1C 100%);
    padding: 2.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header .container {
    position: relative;
    z-index: 2;
}

.header-content {
    text-align: center;
}

.header-icon {
    margin-bottom: 1rem;
}

.header-icon i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    padding: 1.25rem;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}



/* Main Content */
.main-content {
    padding: 2.5rem 0;
    flex: 1;
    background: #FFFFFF;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Sections - Cards modernos */
.config-section,
.post-section {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #E4E4E4;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.config-section:hover,
.post-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.config-section::before,
.post-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #DA291C, #FF6B6B);
}

/* Section Headers */
.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.section-header p {
    color: #696969;
    font-size: 1rem;
    line-height: 1.6;
}

/* Form Styles - Design moderno */
.post-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group label {
    font-weight: 600;
    color: #1A1A1A;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem 1.25rem;
    border: 2px solid #E4E4E4;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #FFFFFF;
    color: #2E2E2E;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #DA291C;
    box-shadow: 0 0 0 4px rgba(218, 41, 28, 0.1);
    transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9B9B9B;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Submit Button - Design moderno */
.submit-btn {
    background: linear-gradient(135deg, #DA291C, #FF6B6B);
    color: #FFFFFF;
    border: none;
    padding: 1.25rem 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(218, 41, 28, 0.3);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(218, 41, 28, 0.4);
    background: linear-gradient(135deg, #E63946, #FF8E8E);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
    background: linear-gradient(135deg, #B71C1C, #E55555);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner - Design moderno */
.loading-spinner {
    text-align: center;
    padding: 3rem 2rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #F0F0F0;
    border-top: 4px solid #DA291C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #696969;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Empty State - Design moderno */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #696969;
}

.empty-state i {
    font-size: 4rem;
    color: #E4E4E4;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.empty-state p {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Generated Post - Design moderno */
.generated-post {
    background: linear-gradient(135deg, #FAFAFA 0%, #F5F5F5 100%);
    border-radius: 16px;
    padding: 2.5rem;
    border-left: 4px solid #DA291C;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.post-content h3 {
    color: #1A1A1A;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.post-content p {
    color: #2E2E2E;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
}

.post-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #E4E4E4;
}

.metadata-item {
    background: #FFFFFF;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #696969;
    border: 1px solid #E4E4E4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.copy-btn {
    background: #FF6B6B;
    color: #FFFFFF;
}

.copy-btn:hover {
    background: #FF8E8E;
    transform: translateY(-1px);
}

.download-btn {
    background: #7AB800;
    color: #FFFFFF;
}

.download-btn:hover {
    background: #8BC34A;
    transform: translateY(-1px);
}

.regenerate-btn {
    background: #F0A800;
    color: #FFFFFF;
}

.regenerate-btn:hover {
    background: #FFB74D;
    transform: translateY(-1px);
}

/* Notifications - Design moderno */
.notification-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
}

.notification {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 1.25rem 1.75rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
    max-width: 400px;
    border: 1px solid #E4E4E4;
}

.notification.success {
    border-left-color: #7AB800;
}

.notification.error {
    border-left-color: #BF4C4A;
}

.notification.warning {
    border-left-color: #F0A800;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 1000px;
        padding: 0 1.5rem;
    }
    
    .header h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-wrapper {
        margin-left: 240px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .header {
        padding: 2rem 0;
    }
    
    .header-icon i {
        font-size: 2rem;
        padding: 0.75rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .config-section,
    .post-section {
        padding: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
    }
    
    .submit-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .post-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .header h1 {
        font-size: 1.25rem;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .config-section,
    .post-section {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.875rem 1rem;
    }
    
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: 1rem;
    }
    
    .menu-item {
        margin: 0 0.5rem 0 0;
        flex-shrink: 0;
    }
    
    .menu-item a {
        padding: 0.75rem 1rem;
        white-space: nowrap;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #DA291C;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .config-section,
    .post-section {
        border: 2px solid #000000;
    }
    
    .submit-btn {
        border: 2px solid #000000;
    }
}

/* Estilos para preservar formatação da resposta */
.post-content pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    border: 1px solid #e0e0e0;
}

.post-content .analysis-content {
    white-space: pre-wrap;
    font-family: inherit;
    line-height: 1.6;
    background: #fafafa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #DA291C;
    margin: 1.5rem 0;
}

.post-content .analysis-content h1,
.post-content .analysis-content h2,
.post-content .analysis-content h3,
.post-content .analysis-content h4,
.post-content .analysis-content h5,
.post-content .analysis-content h6 {
    color: #DA291C;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.post-content .analysis-content ul,
.post-content .analysis-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.post-content .analysis-content li {
    margin-bottom: 0.5rem;
}

.post-content .analysis-content p {
    margin-bottom: 1rem;
}

.post-content .analysis-content strong,
.post-content .analysis-content b {
    color: #DA291C;
    font-weight: 600;
}

.post-content .analysis-content em,
.post-content .analysis-content i {
    color: #FF6B6B;
    font-style: italic;
}

.post-content .analysis-content code {
    background: #f0f0f0;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content .analysis-content blockquote {
    border-left: 4px solid #FF6B6B;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #696969;
}

/* Responsividade para conteúdo de análise */
@media (max-width: 768px) {
    .post-content .analysis-content {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .post-content pre {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
} 