:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --hint-color: #999999;
    --card-bg: #f5f5f5;
    --border-color: #e0e0e0;
    --primary: #2481cc;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ff9800;
    --purple: #9c27b0;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --hint-color: #888888;
    --card-bg: #2d2d2d;
    --border-color: #404040;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    padding-bottom: 80px;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 100%;
    padding: 16px;
}

/* Header */
header {
    text-align: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

header h1 {
    font-size: 22px;
    font-weight: 700;
}

.theme-toggle {
    background: var(--card-bg);
    border: none;
    font-size: 20px;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
}

.date {
    color: var(--hint-color);
    font-size: 13px;
    margin-top: 6px;
}

/* Source Toggle (Actives/Toutes) */
.source-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    background: var(--card-bg);
    padding: 6px;
    border-radius: 12px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.source-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--hint-color);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.source-btn:hover {
    color: var(--text-color);
}

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

.source-btn.active[data-source="all"] {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    border-color: #9c27b0;
}

.source-icon {
    font-size: 16px;
}

.source-label {
    font-size: 12px;
}

/* Category Filters */
.category-filters {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cat-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.4;
    filter: grayscale(100%);
}

.cat-toggle:hover {
    transform: scale(1.1);
}

.cat-toggle.active {
    opacity: 1;
    filter: grayscale(0%);
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 0 2px var(--primary);
}

/* Stats */
.stats {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.stat-card {
    flex: 1;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    color: white;
}

.stat-card.primary { background: linear-gradient(135deg, var(--primary), #1a6bb5); }
.stat-card.success { background: linear-gradient(135deg, var(--success), #388e3c); }
.stat-card.danger { background: linear-gradient(135deg, var(--danger), #d32f2f); }

.stat-number {
    display: block;
    font-size: 22px;
    font-weight: 700;
}

.stat-label {
    font-size: 10px;
    opacity: 0.9;
}

/* Alerts */
.alerts-section {
    background: linear-gradient(135deg, #ff5252, #f44336);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    color: white;
}

.alerts-header {
    font-weight: 700;
    margin-bottom: 8px;
}

.alerts-list {
    font-size: 13px;
}

.alert-item {
    padding: 6px 0;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* Niches */
.niches-section {
    margin-bottom: 16px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.niches-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.niche-card {
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--purple), #7b1fa2);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;
    min-width: 140px;
}

.niche-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.niche-score {
    font-size: 11px;
    opacity: 0.9;
}

/* Search */
.search-container {
    margin-bottom: 12px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text-color);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
}

/* Country Tabs */
.country-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.country-btn {
    flex-shrink: 0;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 12px;
    cursor: pointer;
}

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

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 12px;
    -webkit-overflow-scrolling: touch;
}

.filter-btn {
    flex-shrink: 0;
    padding: 8px 12px;
    border: none;
    border-radius: 16px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Chart */
.chart-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
}

/* Opportunities */
.opportunities-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.opportunity-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 14px;
    position: relative;
    transition: transform 0.2s;
}

.opportunity-card:active {
    transform: scale(0.98);
}

.opportunity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.opportunity-title {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}

.opportunity-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.badge {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 6px;
    font-weight: 600;
}

.badge-score { background: var(--primary); color: white; }
.badge-hot { background: var(--danger); color: white; }
.badge-new { background: var(--success); color: white; }
.badge-up { background: #4caf50; color: white; }
.badge-down { background: #f44336; color: white; }
.badge-explosion { background: linear-gradient(135deg, #ff9800, #f44336); color: white; }

.favorite-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.opportunity-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--hint-color);
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Related Keywords */
.related-section {
    background: rgba(156, 39, 176, 0.1);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

.related-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--purple);
    margin-bottom: 6px;
}

.related-items {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.related-item {
    background: var(--purple);
    color: white;
    font-size: 10px;
    padding: 4px 7px;
    border-radius: 5px;
}

/* Products to sell */
.sell-section {
    background: rgba(36, 129, 204, 0.1);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

.sell-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.sell-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sell-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary);
    color: white;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 6px;
}

.sell-price {
    font-weight: 600;
    opacity: 0.9;
}

/* Advice & Prediction */
.advice-section {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 8px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
}

.advice-text {
    font-size: 12px;
    line-height: 1.3;
}

.prediction-section {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    font-size: 12px;
}

.niche-tag {
    display: inline-block;
    background: var(--purple);
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    margin-top: 8px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--card-bg);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
footer {
    text-align: center;
    padding: 16px;
    color: var(--hint-color);
    font-size: 11px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 30px;
}

.empty-state-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.empty-state-text {
    color: var(--hint-color);
    font-size: 13px;
}

/* Main Tabs */
.main-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: var(--card-bg);
    padding: 6px;
    border-radius: 12px;
}

.main-tab {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-color);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.main-tab.active {
    background: var(--primary);
    color: white;
}

.tab-content {
    display: none;
}

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

/* Raw Data Section */
.raw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.export-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.export-btn:active {
    transform: scale(0.95);
}

.raw-country-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 12px;
    -webkit-overflow-scrolling: touch;
}

.raw-country-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 12px;
    cursor: pointer;
}

.raw-country-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.raw-data-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
}

.raw-list {
    font-family: monospace;
    font-size: 13px;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 12px;
}

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

.raw-term {
    flex: 1;
}

.raw-volume {
    color: var(--hint-color);
    font-size: 11px;
}

.export-country {
    width: 100%;
    margin-top: 8px;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 8px;
    margin-bottom: 16px;
    gap: 4px;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--hint-color);
    cursor: pointer;
    transition: all 0.2s;
}

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

.nav-icon {
    font-size: 20px;
}

.nav-label {
    font-size: 10px;
    font-weight: 600;
}

/* Pages */
.page-content {
    display: none;
}

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

.page-header {
    margin-bottom: 16px;
}

.page-description {
    color: var(--hint-color);
    font-size: 13px;
    line-height: 1.4;
}

/* Alerts Page */
.alert-add-section {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.alert-add-section .search-input {
    flex: 1;
}

.add-alert-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

.tracked-keywords {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.keyword-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 12px 16px;
    border-radius: 10px;
}

.keyword-text {
    font-weight: 500;
}

.keyword-remove {
    background: var(--danger);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
}

.triggered-alerts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert-triggered-item {
    background: linear-gradient(135deg, #ff5252, #f44336);
    color: white;
    padding: 14px;
    border-radius: 12px;
}

.alert-triggered-term {
    font-weight: 700;
    font-size: 15px;
}

.alert-triggered-info {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
}

/* Summary Page */
.summary-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
}

.summary-date {
    font-size: 12px;
    color: var(--hint-color);
    margin-bottom: 12px;
}

.summary-content {
    font-size: 14px;
    line-height: 1.6;
}

.summary-highlight {
    background: linear-gradient(135deg, var(--primary), #1a6bb5);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 12px 0;
    font-weight: 500;
}

.category-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    padding: 12px 16px;
    border-radius: 10px;
}

.category-stat-icon {
    font-size: 24px;
}

.category-stat-info {
    flex: 1;
}

.category-stat-name {
    font-weight: 600;
    font-size: 14px;
}

.category-stat-count {
    font-size: 12px;
    color: var(--hint-color);
}

.category-stat-bar {
    width: 60px;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.category-stat-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
}

/* Events Page */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 16px;
    border-left: 4px solid var(--primary);
}

.event-type {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    margin-bottom: 8px;
}

.event-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
}

.event-description {
    font-size: 13px;
    color: var(--hint-color);
    line-height: 1.4;
    margin-bottom: 10px;
}

.event-trends {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.event-trend-tag {
    background: var(--border-color);
    color: var(--text-color);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
}

/* Stats compactes */
.stats-compact {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--card-bg);
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

.stats-compact span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stats-compact strong {
    color: var(--primary);
}

/* Raw data footer */
.raw-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.export-all {
    width: 100%;
    background: var(--primary);
}

/* ==================== BIZMAN PAGE ==================== */

.bizman-stats {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.bizman-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bizman-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.bizman-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

/* Bizman Insights */
.bizman-insights {
    margin-bottom: 16px;
}

.bizman-insight-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    border-left: 4px solid #3949ab;
}

.insight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.insight-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
}

.insight-confidence {
    background: #3949ab;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
}

.insight-description {
    font-size: 13px;
    color: var(--subtitle-color);
    line-height: 1.4;
    margin-bottom: 10px;
}

.insight-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.insight-term {
    background: rgba(57, 73, 171, 0.15);
    color: #3949ab;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.insight-opportunity {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    background: rgba(76, 175, 80, 0.1);
    padding: 10px;
    border-radius: 8px;
}

.opportunity-label {
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.opportunity-text {
    font-size: 12px;
    line-height: 1.3;
}

/* Bizman Opportunities */
.bizman-opportunities {
    margin-bottom: 16px;
}

.bizman-opp-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
}

.opp-rank {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    min-width: 36px;
    text-align: center;
}

.opp-content {
    flex: 1;
}

.opp-term {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 4px;
}

.opp-reason {
    font-size: 12px;
    color: var(--subtitle-color);
    line-height: 1.3;
    margin-bottom: 8px;
}

.opp-action {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-color);
}

.potential-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.potential-high {
    background: #4CAF50;
    color: white;
}

.potential-medium {
    background: #FF9800;
    color: white;
}

.potential-low {
    background: #9E9E9E;
    color: white;
}

/* Bizman Trends */
.bizman-trends {
    margin-bottom: 16px;
}

.bizman-trend-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
}

.trend-name {
    font-weight: 600;
    font-size: 14px;
    color: #3949ab;
    margin-bottom: 6px;
}

.trend-analysis {
    font-size: 12px;
    color: var(--subtitle-color);
    line-height: 1.3;
    margin-bottom: 8px;
}

.trend-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.trend-term-tag {
    background: rgba(57, 73, 171, 0.1);
    color: #3949ab;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
}

/* Bizman Ranking */
.bizman-ranking {
    margin-bottom: 16px;
}

.bizman-rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
}

.rank-position {
    font-size: 14px;
    font-weight: 700;
    color: var(--hint-color);
    min-width: 24px;
    text-align: center;
}

.rank-score {
    background: linear-gradient(135deg, #3949ab 0%, #5c6bc0 100%);
    color: white;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    min-width: 40px;
    text-align: center;
}

.rank-content {
    flex: 1;
    min-width: 0;
}

.rank-term {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--hint-color);
    margin-top: 2px;
}

.rank-metrics {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 60px;
}

.metric-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Dark mode adjustments for Bizman */
[data-theme="dark"] .insight-term {
    background: rgba(57, 73, 171, 0.3);
}

[data-theme="dark"] .trend-term-tag {
    background: rgba(57, 73, 171, 0.25);
}

[data-theme="dark"] .opp-rank {
    color: #1a1a1a;
}

/* ==================== STOCKX PAGE ==================== */

.stockx-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.stockx-stat {
    flex: 1;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.stockx-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
}

.stockx-stat-label {
    display: block;
    font-size: 11px;
    color: var(--hint-color);
    margin-top: 2px;
}

.stockx-products {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stockx-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 10px;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.15s, box-shadow 0.15s;
}

.stockx-card:active {
    transform: scale(0.98);
}

.stockx-rank {
    font-size: 13px;
    font-weight: 700;
    color: var(--hint-color);
    min-width: 28px;
    text-align: center;
}

.stockx-image {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
}

[data-theme="dark"] .stockx-image {
    background: #3a3a3a;
}

.stockx-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stockx-info {
    flex: 1;
    min-width: 0;
}

.stockx-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stockx-brand {
    font-size: 11px;
    color: var(--hint-color);
    margin-top: 2px;
}

.stockx-meta {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    align-items: center;
}

.stockx-sales {
    font-size: 12px;
    font-weight: 700;
    color: var(--success);
    background: rgba(76, 175, 80, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
}

.stockx-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-color);
}

/* StockX Trend Badges */
.stockx-rank-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 40px;
}

.stockx-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 6px;
    white-space: nowrap;
}

.stockx-badge-hot {
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: white;
    animation: pulse-hot 2s infinite;
}

@keyframes pulse-hot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.stockx-badge-new {
    background: linear-gradient(135deg, #9c27b0, #673ab7);
    color: white;
}

.stockx-badge-up {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
}

.stockx-badge-down {
    background: linear-gradient(135deg, #f44336, #c62828);
    color: white;
}

.stockx-badge-stable {
    background: var(--border-color);
    color: var(--hint-color);
}

/* Top 3 special styling */
.stockx-card:nth-child(1) .stockx-rank {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 4px 8px;
    border-radius: 8px;
}

.stockx-card:nth-child(2) .stockx-rank {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: #333;
    padding: 4px 8px;
    border-radius: 8px;
}

.stockx-card:nth-child(3) .stockx-rank {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
}

/* Copy Button */
.copy-section {
    margin-bottom: 12px;
}

.copy-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #1a6bb5);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    transform: scale(1.02);
}

.copy-btn:active {
    transform: scale(0.98);
}

.copy-btn.copied {
    background: linear-gradient(135deg, var(--success), #388e3c);
}

/* ==================== EASY PAGE ==================== */

/* Model Toggle GPT/Claude */
.easy-model-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.model-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.model-btn:hover {
    border-color: var(--primary);
}

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

/* Generate Button Section */
.easy-generate-section {
    margin-bottom: 16px;
    text-align: center;
}

.generate-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

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

.generate-btn:disabled {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.generate-icon {
    font-size: 20px;
}

.spinner-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.generate-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.loading-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.empty-state-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.error-state {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 20px;
}

.error-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* History Select */
.easy-history-select {
    margin-bottom: 16px;
}

.easy-history-select select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
}

/* Score Display */
.easy-score {
    text-align: center;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 16px;
}

.easy-score.high {
    background: linear-gradient(135deg, #10b981, #059669);
}

.easy-score.medium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.easy-score.low {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.easy-score .score-value {
    font-size: 48px;
    font-weight: 800;
    color: white;
    display: block;
    line-height: 1;
}

.easy-score .score-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin-top: 8px;
    display: block;
}

/* Analysis Content */
.easy-container {
    min-height: 200px;
}

.easy-analysis {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    line-height: 1.6;
    font-size: 14px;
}

.easy-analysis h1,
.easy-analysis h2,
.easy-analysis h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.easy-analysis h1 {
    font-size: 20px;
}

.easy-analysis h2 {
    font-size: 17px;
    color: var(--primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.easy-analysis h3 {
    font-size: 15px;
    color: var(--text-color);
}

.easy-analysis p {
    margin-bottom: 10px;
}

.easy-analysis strong {
    color: var(--text-color);
    font-weight: 700;
}

.easy-analysis li {
    margin-left: 16px;
    margin-bottom: 6px;
    list-style: disc;
}

.easy-analysis table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 12px;
}

.easy-analysis tr {
    border-bottom: 1px solid var(--border-color);
}

.easy-analysis td {
    padding: 8px 6px;
    text-align: left;
}

.easy-analysis tr:first-child td {
    font-weight: 700;
    background: var(--section-bg);
}

/* Markdown content wrapper */
.markdown-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ==================== TOAST NOTIFICATION ==================== */

.toast-notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--card-bg);
    color: var(--text-color);
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
