/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-color: #2196F3;
    --success-color: #4CAF50;
    --warning-color: #FFC107;
    --danger-color: #F44336;
    --purple-color: #9C27B0;
    
    /* Additional Colors */
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --text-dark: #212529;
    --text-light: #6c757d;
    
    /* Dark Mode Colors */
    --dark-bg: #1a1a1a;
    --dark-surface: #2d2d2d;
    --dark-text: #ffffff;
    --dark-text-secondary: #b3b3b3;
}

/* Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
    transition: all 0.3s ease;
}

/* Dark Mode */
[data-theme="dark"] {
    background-color: var(--dark-bg) !important;
    color: var(--dark-text) !important;
}

[data-theme="dark"] .bg-light {
    background-color: var(--dark-surface) !important;
}

[data-theme="dark"] .card {
    background-color: var(--dark-surface) !important;
    border-color: #404040 !important;
    color: var(--dark-text) !important;
}

[data-theme="dark"] .modal-content {
    background-color: var(--dark-surface) !important;
    color: var(--dark-text) !important;
}

[data-theme="dark"] .offcanvas {
    background-color: var(--dark-surface) !important;
    color: var(--dark-text) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--dark-text-secondary) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--dark-bg) !important;
    border-color: #404040 !important;
    color: var(--dark-text) !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: var(--dark-bg) !important;
    border-color: var(--primary-color) !important;
    color: var(--dark-text) !important;
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25) !important;
}

/* Navigation */
.navbar {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--purple-color) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::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="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-image {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Stats Cards */
.stat-card {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::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;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* Hobby Cards */
.hobby-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hobby-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.hobby-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    position: relative;
}

.hobby-card-body {
    padding: 1.5rem;
}

.category-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-entretenimento { background-color: var(--primary-color); color: white; }
.category-esportes { background-color: var(--success-color); color: white; }
.category-arte { background-color: var(--purple-color); color: white; }
.category-musica { background-color: var(--warning-color); color: black; }
.category-leitura { background-color: var(--danger-color); color: white; }
.category-jogos { background-color: #FF5722; color: white; }
.category-culinaria { background-color: #795548; color: white; }
.category-outros { background-color: #607D8B; color: white; }

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Charts */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

#pieChart, #lineChart {
    max-width: 100%;
    height: auto;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.3);
    transition: width 0.6s, height 0.6s;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn > * {
    position: relative;
    z-index: 1;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #eee;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #eee;
    padding: 1.5rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Offcanvas */
.offcanvas {
    border-radius: 15px 0 0 15px;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
}

.offcanvas-header {
    border-bottom: 1px solid #eee;
    padding: 1.5rem;
}

.offcanvas-body {
    padding: 1.5rem;
}

/* Accordion */
.accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.accordion-button {
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    background-color: white;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: none;
    border: none;
}

.accordion-body {
    padding: 1.5rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    padding-left: 70px;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-content {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Insights Cards */
.insight-card {
    background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
    color: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.insight-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .offcanvas {
        border-radius: 0;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section .display-4 {
        font-size: 1.75rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
    
    .modal-body,
    .modal-header,
    .modal-footer {
        padding: 1rem;
    }
    
    .offcanvas-body,
    .offcanvas-header {
        padding: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

.animate-slide-in {
    animation: slideIn 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    to { left: 100%; }
}

/* Utility Classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.box-shadow {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.border-radius {
    border-radius: 15px;
}

.transition {
    transition: all 0.3s ease;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .modal,
    .offcanvas,
    footer {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000 !important;
    }
    
    .btn {
        border: 2px solid #000 !important;
    }
}
