/* WhatsApp Chat Analyzer Styles */

* {
    box-sizing: border-box;
}

body {
    background: white;
    color: black;
}

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

/* Header */
header {
    text-align: center;
    color: black;
    padding: 40px 20px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header .subtitle {
    font-size: 1.1rem;
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-area p {
    color: #666;
    font-size: 1.1rem;
}

.upload-area code {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

.upload-hint {
    font-size: 0.9rem !important;
    margin-top: 10px;
    opacity: 0.7;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 8px;
}

.file-name {
    font-weight: 600;
    color: #2e7d32;
}

.btn-clear {
    background: #ef5350;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-clear:hover {
    background: #c62828;
}

/* Members Section */
.members-section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.members-section h2 {
    margin-bottom: 10px;
    color: #333;
}

.section-hint {
    color: #666;
    margin-bottom: 20px;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.member-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.member-checkbox:hover {
    background: #e8e8e8;
}

.member-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.member-checkbox span {
    flex: 1;
}

.message-count {
    color: #888;
    font-size: 0.9rem;
}

.btn-analyze {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

/* Loading Section */
.loading-section {
    background: white;
    border-radius: 16px;
    padding: 60px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Results Section */
.results-section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.results-section h2 {
    margin-bottom: 30px;
    color: #333;
}

/* Stats Overview */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.chart-wrapper {
    background: #fafafa;
    border-radius: 12px;
    padding: 20px;
    overflow: hidden;
}

.chart-wrapper.full-width {
    grid-column: span 2;
}

.chart-wrapper h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

.chart {
    width: 100%;
    overflow-x: auto;
}

.chart svg {
    max-width: 100%;
    height: auto;
}

/* Export Section */
.export-section {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.export-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.btn-export {
    padding: 12px 24px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: background 0.3s;
}

.btn-export:hover {
    background: #388E3C;
}

/* Responsive */
@media (max-width: 900px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .chart-wrapper.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}
