/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    color: #7f8c8d;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.institution-badge {
    display: inline-block;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9em;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
}

.stat-card.positive::before { background: linear-gradient(90deg, #28a745, #20c997); }
.stat-card.negative::before { background: linear-gradient(90deg, #dc3545, #fd7e14); }
.stat-card.neutral::before { background: linear-gradient(90deg, #6c757d, #a0aec0); }

.stat-card h3 {
    color: #2c3e50;
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
}

.stat-card h2 {
    font-size: 3em;
    font-weight: 800;
    margin-bottom: 10px;
}

.stat-card.positive h2 { color: #28a745; }
.stat-card.negative h2 { color: #dc3545; }
.stat-card.neutral h2 { color: #6c757d; }

.stat-card p {
    color: #7f8c8d;
    font-size: 1.1em;
}

.actions-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.actions-container h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.action-btn i {
    font-size: 1.2em;
}

.action-btn.crawler {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
}

.action-btn.preprocess {
    background: linear-gradient(45deg, #28a745, #1e7e34);
    color: white;
}

.action-btn.analyze {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.data-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.data-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
    text-align: center;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.data-table th {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.data-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.data-table tr:hover {
    background-color: #e8f4fc;
    transition: background-color 0.2s ease;
}

.data-table td:last-child {
    font-weight: 600;
}

.sentiment-positive {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

.sentiment-negative {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

.sentiment-neutral {
    color: #6c757d;
    background-color: rgba(108, 117, 125, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

.source-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
    color: white;
}

.source-twitter { background: #1da1f2; }
.source-facebook { background: #3b5998; }
.source-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.source-forum { background: #17a2b8; }

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.success {
    background: #28a745;
    opacity: 1;
    transform: translateX(0);
}

.notification.error {
    background: #dc3545;
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .data-table {
        font-size: 0.9em;
    }
    
    .header h1 {
        font-size: 2em;
    }
}

/* Chart container styles */
.chart-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.chart-container h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8em;
}

/* Progress bar styles */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-positive { background: linear-gradient(90deg, #28a745, #20c997); }
.progress-negative { background: linear-gradient(90deg, #dc3545, #fd7e14); }
.progress-neutral { background: linear-gradient(90deg, #6c757d, #a0aec0); }