:root {
    --primary-color: #FFD700;
    --secondary-color: #FFA500;
    --success-color: #4CAF50;
    --danger-color: #F44336;
    --warning-color: #FF9800;
    --dark-bg: #0d0d0d;
    --light-bg: #1a1a1a;
    --card-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #333333;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header Styles */
.navbar {
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 40px;
    height: 40px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Section Styles */
.section {
    display: none;
    padding: 2rem 0;
}

.section.active {
    display: block;
}

/* Price Card */
.price-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

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

.price-header h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.price-source {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.price-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.price-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.price-change.positive {
    color: var(--success-color);
}

.price-change.negative {
    color: var(--danger-color);
}

.price-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.stat-value.positive {
    color: var(--success-color);
}

.stat-value.negative {
    color: var(--danger-color);
}

/* Chart Styles */
.chart-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    height: 400px;
    position: relative;
}

.chart-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.chart-controls select,
.chart-controls button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
}

.chart-controls button {
    background: var(--primary-color);
    color: var(--dark-bg);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chart-controls button:hover {
    background: var(--secondary-color);
}

/* Alerts Styles */
.alerts-list {
    margin-top: 1.5rem;
}

.alert-item {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-info h4 {
    margin-bottom: 0.5rem;
}

.alert-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

/* Analysis Styles */
.analysis-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.analysis-result {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

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

.analysis-header h3 {
    font-size: 1.25rem;
}

.analysis-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.analysis-content > div {
    margin-bottom: 1.5rem;
}

.trend-indicator,
.prediction,
.recommendation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.trend-value,
.prediction-value,
.recommendation-value {
    font-weight: 600;
    font-size: 1.125rem;
}

.confidence {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.confidence-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
    transition: width 0.3s ease;
}

.indicator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.indicator-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-primary);
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Footer */
footer {
    background: var(--dark-bg);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Loading Skeleton */
.loading-skeleton {
    display: inline-block;
    min-width: 60px;
    height: 1em;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.1) 25%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 2px;
}

/* Enhanced Progress Bar */
.analysis-progress {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Enhanced Indicator Items */
.indicator-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.5s ease forwards;
}

.indicator-item.loaded {
    opacity: 1;
    transform: translateY(0);
}

.indicator-item.loading .loading-skeleton {
    width: 100%;
}

.indicator-name {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.indicator-value {
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.indicator-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.indicator-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    width: 0%;
    transition: width 1s ease;
}

/* Trend Arrow Animation */
.trend-arrow {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.trend-arrow.up {
    color: var(--success-color);
    transform: rotate(-45deg);
}

.trend-arrow.down {
    color: var(--danger-color);
    transform: rotate(135deg);
}

.trend-arrow.neutral {
    color: var(--warning-color);
    transform: rotate(90deg);
}

/* Recommendation Badge */
.recommendation-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.recommendation-badge.buy {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.recommendation-badge.sell {
    background: rgba(244, 67, 54, 0.2);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.recommendation-badge.hold {
    background: rgba(255, 152, 0, 0.2);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

/* Price Change Prediction */
.price-change-prediction {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

.price-change-prediction.positive {
    color: var(--success-color);
}

.price-change-prediction.negative {
    color: var(--danger-color);
}

/* Animated Confidence Fill */
.confidence-fill.animated {
    position: relative;
    overflow: hidden;
}

.confidence-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2s infinite;
}

/* Stagger Animation for Indicators */
.indicator-item:nth-child(1) { animation-delay: 0.1s; }
.indicator-item:nth-child(2) { animation-delay: 0.2s; }
.indicator-item:nth-child(3) { animation-delay: 0.3s; }
.indicator-item:nth-child(4) { animation-delay: 0.4s; }

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top: 3px solid #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* News Section Styles */
.news-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.news-controls select,
.news-controls button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text-primary);
}

.news-controls button {
    background: var(--primary-color);
    color: var(--dark-bg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-controls button:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.news-container {
    min-height: 400px;
}

.news-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-top: 4px solid #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.news-grid {
    display: grid;
    gap: 1.5rem;
}

.news-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: slideInUp 0.5s ease forwards;
    opacity: 0;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.15);
}

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

.news-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-bg);
    font-weight: 700;
    font-size: 1.2rem;
}

.news-author {
    flex: 1;
}

.news-author-name {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.news-author-username {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.news-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.news-content {
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.news-content .original {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-style: italic;
}

.news-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.news-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.no-news {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.no-news p {
    font-size: 1.125rem;
}

/* Stagger animation for news items */
.news-item:nth-child(1) { animation-delay: 0.1s; }
.news-item:nth-child(2) { animation-delay: 0.2s; }
.news-item:nth-child(3) { animation-delay: 0.3s; }
.news-item:nth-child(4) { animation-delay: 0.4s; }
.news-item:nth-child(5) { animation-delay: 0.5s; }
.news-item:nth-child(6) { animation-delay: 0.6s; }
.news-item:nth-child(7) { animation-delay: 0.7s; }
.news-item:nth-child(8) { animation-delay: 0.8s; }

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .price-display {
        flex-direction: column;
        gap: 0.5rem;
    }

    .price-value {
        font-size: 2rem;
    }

    .price-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .analysis-controls {
        flex-direction: column;
    }

    .news-controls {
        flex-direction: column;
    }

    .news-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
}