/* Global Styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #f72585;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --danger-color: #e63946;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f0f2f5;
    padding: 0;
    margin: 0;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
}

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

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    background-color: var(--dark-color);
    color: var(--light-color);
}

/* Card Styles */
.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Upload Section */
#upload-section {
    text-align: center;
}

#drop-area {
    border: 2px dashed #ccc;
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    margin: 1.5rem 0;
    transition: var(--transition);
}

#drop-area.highlight {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.05);
}

.file-input-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.upload-icon img {
    width: 100%;
    height: 100%;
}

.privacy-note {
    margin-top: 1.5rem;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Data Detection Section */
.detection-result {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
}

#preview-table {
    overflow-x: auto;
    margin-top: 1rem;
}

#preview-table table {
    width: 100%;
    border-collapse: collapse;
}

#preview-table th, #preview-table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

#preview-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Insights Grid */
.insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.insight-module {
    display: flex;
    flex-direction: column;
}

.chart-container {
    flex: 1;
    min-height: 250px;
    position: relative;
    margin-bottom: 1rem;
}

.insight-text {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
}

/* Suggestions Panel */
#suggestions-panel {
    margin-bottom: 2rem;
}

#suggestions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.suggestion-item {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-item:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

/* Drill Down Explorer */
.drill-down-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#drill-down-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Summary Section */
#summary-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

#summary-content p {
    margin-bottom: 1rem;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .detection-result {
        grid-template-columns: 1fr;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    #drill-down-content {
        grid-template-columns: 1fr;
    }
    
    #suggestions-list {
        grid-template-columns: 1fr;
    }
}
