:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-bg: #1e1e2e;
    --dark-card: #2d2d44;
    --dark-border: #3d3d5c;
    --light-bg: #f8f9fa;
    --light-card: #ffffff;
    --light-border: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

body.dark-theme {
    background: var(--dark-bg);
    color: #e5e7eb;
}

.dark-theme .card {
    background: var(--dark-card);
}

.dark-theme .form-control {
    background: var(--dark-card);
    border-color: var(--dark-border);
    color: #e5e7eb;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.card {
    background: var(--light-card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

.section {
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.dark-theme .section-title {
    color: white;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 24px;
}

.mb-3 {
    margin-bottom: 16px;
}

.mt-4 {
    margin-top: 24px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-primary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--light-border);
}

.dark-theme .table th,
.dark-theme .table td {
    border-bottom-color: var(--dark-border);
}

.table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.table tbody tr:hover {
    background: rgba(0,0,0,0.02);
}

.dark-theme .table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 30px;
}

.pagination-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--light-card);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid var(--light-border);
}

.dark-theme .pagination-item {
    background: var(--dark-card);
    color: #e5e7eb;
    border-color: var(--dark-border);
}

.pagination-item:hover,
.pagination-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
    border-radius: 0 0 30% 30% / 0 0 30px 30px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.hero p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.dark-theme .stat-card {
    background: var(--dark-card);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.feature-card {
    text-align: center;
    padding: 40px 30px;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.quote-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}

.dark-theme .quote-card {
    background: linear-gradient(135deg, var(--dark-card) 0%, var(--dark-bg) 100%);
}

.quote-symbol {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.dark-theme .quote-symbol {
    color: white;
}

.quote-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.quote-change {
    font-size: 1.1rem;
    font-weight: 500;
}

.quote-change.positive {
    color: var(--success-color);
}

.quote-change.negative {
    color: var(--danger-color);
}

.calendar-event {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.dark-theme .calendar-event {
    background: var(--dark-card);
}

.calendar-event:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.event-time {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.event-country {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    margin-bottom: 8px;
}

.event-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.event-values {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.event-value {
    display: flex;
    align-items: center;
    gap: 5px;
}

.importance-high {
    border-left-color: var(--danger-color);
}

.importance-medium {
    border-left-color: var(--warning-color);
}

.importance-low {
    border-left-color: var(--success-color);
}

.article-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.dark-theme .article-card {
    background: var(--dark-card);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.article-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

.article-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.article-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
}

.dark-theme .article-title {
    color: white;
}

.article-title:hover {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.resource-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: transform 0.3s, box-shadow 0.3s;
}

.dark-theme .resource-card {
    background: var(--dark-card);
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
}

.resource-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.resource-info {
    flex: 1;
}

.resource-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.resource-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.resource-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
}

.dark-theme .loading-content {
    background: var(--dark-card);
}

.price-up {
    color: var(--success-color);
}

.price-down {
    color: var(--danger-color);
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.text-muted {
    color: var(--text-secondary);
}

.font-bold {
    font-weight: bold;
}

.text-sm {
    font-size: 0.9rem;
}

.text-lg {
    font-size: 1.2rem;
}

.text-xl {
    font-size: 1.5rem;
}

.hidden {
    display: none !important;
}
