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

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

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

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

.subtitle {
    font-size: 1em;
    opacity: 0.9;
}

/* Tabs Navigation */
.tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    background: #f5f5f5;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: #efefef;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.panel {
    background: #fafafa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.panel h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.input-group input,
.input-group select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

#stock-symbol {
    flex: 0 1 150px;
}

#stock-exchange {
    flex: 0 1 100px;
}

#stock-question,
#portfolio-question {
    flex: 1;
    min-width: 200px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.btn-primary:active {
    transform: translateY(0);
}

/* Loading, Error, Result */
.loading,
.error,
.result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
}

.hidden {
    display: none !important;
}

.loading {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 4px solid #1976d2;
}

.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.result {
    background: #f1f8e9;
    color: #33691e;
    border-left: 4px solid #558b2f;
}

/* Analysis Cards */
.analysis-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.analysis-card h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.analysis-card p {
    line-height: 1.6;
    color: #555;
    margin: 8px 0;
}

.analysis-card ul {
    margin-left: 20px;
    margin-top: 10px;
}

.analysis-card li {
    margin: 8px 0;
    color: #555;
}

.risk-high {
    color: #c62828;
    font-weight: 600;
}

.risk-medium {
    color: #f57c00;
    font-weight: 600;
}

.risk-low {
    color: #388e3c;
    font-weight: 600;
}

.recommendation {
    background: #f3e5f5;
    border-left: 4px solid #764ba2;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    font-weight: 600;
    color: #764ba2;
}

/* Stock Data Table */
.stock-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
}

.stock-data-table th,
.stock-data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.stock-data-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.stock-data-table tr:hover {
    background: #f5f5f5;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group input,
    .input-group select,
    .btn {
        width: 100%;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        border-bottom: none;
        border-right: 3px solid transparent;
    }

    .tab-btn.active {
        border-bottom: none;
        border-right-color: #667eea;
    }
}
