:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

header h1 a {
    color: var(--text);
    text-decoration: none;
}

header nav {
    display: flex;
    gap: 1.5rem;
}

header nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

header nav a:hover {
    color: var(--primary);
}

main {
    flex: 1;
    padding: 2rem 0;
}

footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p, .subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.symbol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.symbol-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s;
}

.symbol-card:hover {
    box-shadow: var(--shadow-lg);
}

.symbol-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.symbol-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.timeframe {
    background: var(--bg);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
}

.symbol-info {
    margin-bottom: 1rem;
}

.symbol-info > div {
    margin-bottom: 0.75rem;
}

.symbol-info .label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.symbol-info .value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
}

.price .value {
    color: var(--primary);
}

.signal {
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.signal-buy {
    background: #d1fae5;
    color: #065f46;
}

.signal-sell {
    background: #fee2e2;
    color: #991b1b;
}

.signal-neutral {
    background: var(--bg);
    color: var(--text-light);
}

.signal-strong_buy {
    background: #10b981;
    color: white;
}

.signal-strong_sell {
    background: #ef4444;
    color: white;
}

.timestamp {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.timestamp small {
    color: var(--text-light);
    font-size: 0.75rem;
}

.symbol-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--bg);
}

.no-data {
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.detail-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.card-full {
    grid-column: 1 / -1;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 600;
}

.indicators-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.indicator-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.indicator-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.indicator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.indicator-name {
    font-weight: 600;
}

.indicator-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.indicator-bar {
    height: 0.5rem;
    background: var(--bg);
    border-radius: 0.25rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.indicator-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--warning), var(--danger));
    transition: width 0.3s;
}

.indicator-zones {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-light);
}

.indicator-description {
    margin-top: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-buy {
    background: #d1fae5;
    color: #065f46;
}

.badge-sell {
    background: #fee2e2;
    color: #991b1b;
}

.badge-neutral {
    background: var(--bg);
    color: var(--text-light);
}

.badge-strong {
    background: #dbeafe;
    color: #1e40af;
}

.badge-moderate {
    background: #fef3c7;
    color: #92400e;
}

.badge-weak {
    background: var(--bg);
    color: var(--text-light);
}

.ma-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.ma-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--bg);
    border-radius: 0.25rem;
}

.analysis-section {
    margin-bottom: 1.5rem;
}

.analysis-section:last-child {
    margin-bottom: 0;
}

.analysis-section h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.analysis-text {
    line-height: 1.8;
    color: var(--text);
}

pre.analysis-text {
    white-space: pre-wrap;
    font-family: inherit;
    background: var(--bg);
    padding: 1rem;
    border-radius: 0.375rem;
    border-left: 3px solid var(--primary);
}

.back-link {
    margin-top: 2rem;
}

.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

@media (max-width: 768px) {
    .symbol-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .header-flex {
        flex-direction: column;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .header-actions .btn {
        flex: 1;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
