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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 20px;
    text-align: center;
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.upload-section {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.upload-box {
    border: 2px dashed #007bff;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-box:hover {
    border-color: #0056b3;
    background: #f8f9ff;
}

.upload-box.dragover {
    border-color: #28a745;
    background: #f8fff8;
}

.upload-icon {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 15px;
}

.form-section {
    padding: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input, .form-group select {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #007bff;
}

.analyze-btn {
    width: 100%;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.3);
}

.results {
    display: none;
    padding: 20px;
    background: #f8f9fa;
}

.results.show {
    display: block;
}

.chart-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    position: relative;
    height: 400px;
}

.chart-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.result-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-left: 5px solid #007bff;
}

.result-card.bullish {
    border-left-color: #28a745;
}

.result-card.bearish {
    border-left-color: #dc3545;
}

.result-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.metric:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.metric-label {
    font-weight: 500;
    color: #6c757d;
}

.metric-value {
    font-weight: 600;
    color: #2c3e50;
}

.metric-value.positive {
    color: #28a745;
}

.metric-value.negative {
    color: #dc3545;
}

.trend-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.trend-indicator.bullish {
    background: #d4edda;
    color: #155724;
}

.trend-indicator.bearish {
    background: #f8d7da;
    color: #721c24;
}

.probability-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.probability-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.probability-fill.bullish {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.probability-fill.bearish {
    background: linear-gradient(90deg, #dc3545, #fd7e14);
}

.uploaded-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-top: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .upload-box {
        padding: 20px;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .chart-container {
        height: 300px;
        padding: 15px;
    }
    
    .legend {
        gap: 10px;
    }
    
    .legend-item {
        font-size: 0.75rem;
    }
}