* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.main-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    color: white;
}

.content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: white;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

h1 {
    font-size: 2.5em;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
}

.controls {
    margin-bottom: 30px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

label {
    font-weight: 600;
    color: white;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

select {
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
}

select:hover {
    background: white;
    border-color: rgba(255, 255, 255, 0.5);
}

select:focus {
    outline: none;
    background: white;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    background: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: #f8f9ff;
}

button:active {
    transform: translateY(0);
}

.loading {
    text-align: center;
    padding: 20px;
    font-size: 1.1em;
    color: white;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-bottom: 20px;
}

.error {
    background: rgba(255, 100, 100, 0.2);
    border: 2px solid rgba(255, 100, 100, 0.5);
    color: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

#chart-container {
    margin-top: 0;
}

#price-chart,
#eps-chart,
#revenue-chart {
    margin-bottom: 30px;
    background: #fafafa;
    border-radius: 8px;
    padding: 15px;
    min-height: 450px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.metadata {
    background: #f0f4ff;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #333;
}

.analysis-summary {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.analysis-summary h2 {
    color: white;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.analysis-summary h3 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75em;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.analysis-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
}

.card-label {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    text-transform: uppercase;
}

.target-base .card-label {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.target-bull .card-label {
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
}

.target-bear .card-label {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.analysis-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: #f8f9ff;
    background: white;
}

.analysis-card.target-base {
    border-top: 3px solid #667eea;
}

.analysis-card.target-bull {
    border-top: 3px solid #2ecc71;
}

.analysis-card.target-bear {
    border-top: 3px solid #e74c3c;
}

.price-value {
    font-size: 1.6em;
    font-weight: bold;
    color: #333;
    margin: 8px 0;
}

.price-date {
    font-size: 0.75em;
    color: #777;
}

.upside {
    font-size: 0.95em;
    font-weight: 600;
    margin-top: 5px;
}

.target-base .upside {
    color: #667eea;
}

.target-bull .upside {
    color: #2ecc71;
}

.target-bear .upside {
    color: #e74c3c;
}

.valuation-details {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.valuation-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.valuation-item:last-child {
    border-bottom: none;
}

.valuation-item .label {
    font-weight: 600;
    color: #555;
    font-size: 0.85em;
}

.valuation-item .value {
    font-weight: bold;
    color: #667eea;
    font-size: 1em;
}

.sentiment-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sentiment-text {
    color: #444;
    line-height: 1.5;
    font-size: 0.85em;
    margin-top: 8px;
}

.analysis-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75em;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    line-height: 1.6;
}

@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
    }

    .content {
        width: 100%;
    }

    .analysis-grid {
        grid-template-columns: 1fr 1fr;
    }

    h1 {
        font-size: 2em;
    }
}
