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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

.header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.header-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

.main-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
}

.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

.upload-section {
    margin-bottom: 3rem;
}

.input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .input-group {
        grid-template-columns: 1fr;
    }
}

.input-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    transition: border-color 0.3s ease;
}

.input-card:hover {
    border-color: #667eea;
}

.input-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.input-icon {
    font-size: 1.5rem;
}

.input-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.file-upload-area {
    position: relative;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #667eea;
    background-color: #f0f4ff;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background-color: #e6f3ff;
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-content p {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.upload-content small {
    color: #718096;
    font-size: 0.9rem;
}

.sample-data-section {
    margin-top: 1rem;
    text-align: center;
}

.sample-btn {
    background: #e2e8f0;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: #4a5568;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sample-btn:hover {
    background: #cbd5e0;
}

.config-area {
    width: 100%;
}

#configArea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    background-color: #fafafa;
    resize: vertical;
}

.analyze-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.2rem;
}

.results-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.results-section h2 {
    color: #2d3748;
    margin-bottom: 2rem;
    font-weight: 600;
}

.results-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.result-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.result-card h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-weight: 600;
}

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #374151;
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
}

.action-keep { background-color: #dcfce7 !important; }
.action-cultivate { background-color: #fed7aa !important; }
.action-nurture { background-color: #fef3c7 !important; }
.action-monitor { background-color: #fef08a !important; }
.action-withdraw { background-color: #fecaca !important; }

.chart-container {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.chart-bar {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
}

.chart-label {
    min-width: 120px;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.chart-progress {
    flex: 1;
    height: 20px;
    background: #e5e7eb;
    border-radius: 10px;
    margin: 0 0.5rem;
    overflow: hidden;
}

.chart-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.chart-value {
    min-width: 30px;
    text-align: right;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.download-section {
    text-align: center;
    margin-top: 2rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.download-btn:hover {
    background: #059669;
}

.footer {
    text-align: center;
    color: white;
    margin-top: 2rem;
    opacity: 0.8;
}

.footer p {
    margin-bottom: 0.5rem;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.file-info {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #e6fffa;
    border: 1px solid #81e6d9;
    border-radius: 6px;
    color: #234e52;
    font-size: 0.9rem;
}