:root {
    --primary-color: #2563eb;
    --hot-color: #ef4444;
    --watch-color: #f59e0b;
    --success-color: #10b981;
    --filtered-color: #8b5cf6;
    --failed-color: #6b7280;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Navigation Bar */
.navbar {
    background: var(--bg-card);
    border-bottom: 2px solid var(--border-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-brand {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 15px 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    padding: 20px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-menu a:hover {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.1);
}

.nav-menu a.active {
    color: var(--text-primary);
    border-bottom-color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
}

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

header {
    text-align: center;
    padding: 30px 20px 20px;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.timestamp {
    display: inline-block;
    background: var(--bg-card);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.search-container {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-notification {
    margin-top: 15px;
    display: none;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.search-notification.success {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.search-notification.error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.search-notification.info {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.redirect-btn {
    padding: 6px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.redirect-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Filter Styles */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.filter-group select {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--bg-dark);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 160px;
}

.filter-group select:hover {
    border-color: #3b82f6;
}

.filter-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.filter-reset-btn {
    padding: 10px 20px;
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-reset-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

#ticker-search {
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.05rem;
    width: 220px;
    text-transform: uppercase;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

#ticker-search:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

#ticker-search::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

#search-button {
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

#search-button:active {
    transform: translateY(0);
}

.search-message {
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 8px;
    min-width: 160px;
    font-weight: 500;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.summary-card {
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.summary-card.clickable {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.summary-card.clickable:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.summary-card.clickable .card-number {
    transition: transform 0.3s ease;
}

.summary-card.clickable:hover .card-number {
    transform: scale(1.1);
}

.card-icon {
    font-size: 3rem;
    opacity: 0.9;
}

.card-content {
    flex: 1;
}

.card-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.card-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.card-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.summary-card.hot .card-number {
    color: var(--hot-color);
}

.summary-card.watch .card-number {
    color: var(--watch-color);
}

.summary-card.filtered .card-number {
    color: var(--filtered-color);
}

.summary-card.analyzed .card-number {
    color: var(--success-color);
}

.summary-card.failed .card-number {
    color: var(--failed-color);
}

.results-section {
    margin-bottom: 50px;
}

.section-header {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid;
}

.hot-header {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--hot-color);
}

.watch-header {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--watch-color);
}

.failed-header {
    background: rgba(107, 114, 128, 0.1);
    border-left-color: var(--failed-color);
}

.section-header h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.stocks-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Compact Stock Cards */
.stocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stock-card-compact {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    transition: all 0.25s ease;
    position: relative;
}

.stock-card-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 10px 0 0 10px;
}

.stock-card-compact:hover {
    background: var(--bg-card-hover);
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.stock-symbol {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.compare-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.compare-selected-button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
}

.compare-selected-button:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.compare-selected-button:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    opacity: 0.5;
}

.chart-btn {
    padding: 6px 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.chart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.stock-data {
    display: grid;
    gap: 6px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
}

.data-row .label {
    color: var(--text-secondary);
}

.data-row .value {
    font-weight: 600;
    color: var(--text-primary);
}

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

.data-row .value.negative {
    color: var(--hot-color);
}

/* Page Info */
.page-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.result-count, .page-count {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.result-count span, .page-count span {
    font-weight: 700;
    color: var(--text-primary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 14px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
}

.page-btn:hover {
    background: var(--bg-card-hover);
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.page-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.page-ellipsis {
    color: var(--text-secondary);
    padding: 0 8px;
}

/* Failed Tickers Grid */
.failed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.failed-ticker-item {
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.failed-ticker-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Filtered Stocks Grid */
.filtered-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.filtered-ticker-item {
    background: var(--bg-card);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filtered-ticker-item:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.filtered-ticker-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    text-decoration: none;
    color: var(--text-primary);
}

.filtered-ticker-link .ticker-symbol {
    font-weight: 600;
    font-size: 0.95rem;
}

.filtered-ticker-link .view-chart-icon {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.filtered-ticker-item:hover .view-chart-icon {
    opacity: 1;
}

.filter-explanation {
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.filter-explanation p {
    margin: 0;
}

/* Home Page Content */
.home-content {
    margin: 40px 0;
}

.welcome-section {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
    max-width: 900px;
    margin: 0 auto;
}

.welcome-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    text-align: center;
}

.welcome-section p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.welcome-section p:last-child {
    margin-bottom: 0;
    margin-top: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.welcome-section strong {
    color: var(--text-primary);
}

.welcome-section h3 {
    font-size: 1.5rem;
    margin-top: 25px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.criteria-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.criteria-list li {
    padding: 12px 0 12px 30px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.7;
}

.criteria-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.criteria-list strong {
    color: var(--text-primary);
}

/* Ad Containers - Google AdSense */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px auto;
    padding: 5px;
    width: 100%;
    max-width: 728px;
    box-sizing: border-box;
}

.ad-banner {
    min-height: 50px;
    max-height: 90px;
    background: transparent;
    border-radius: 8px;
    width: 100%;
    overflow: hidden;
}

.ad-banner .adsbygoogle {
    display: block;
    width: 100%;
    max-height: 90px;
}

/* Fallback placeholder style (no longer used, kept for reference) */
.ad-placeholder {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    padding: 30px;
    opacity: 0.5;
}

/* Export Page Styles */
.export-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.export-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
}

.export-section h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.export-section p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.export-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.export-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.export-btn.hot {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.export-btn.watch {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.export-btn.combined {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
}

.export-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.export-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-hot {
    background: rgba(239, 68, 68, 0.2);
    color: var(--hot-color);
}

.badge-watch {
    background: rgba(245, 158, 11, 0.2);
    color: var(--watch-color);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--hot-color);
    color: var(--hot-color);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

footer p {
    color: var(--text-secondary);
    margin: 5px 0;
}

.disclaimer {
    font-size: 0.85rem;
    font-style: italic;
}

/* Tablet styles for filters */
@media (max-width: 900px) {
    .filters-container {
        gap: 12px;
        padding: 14px;
    }
    
    .filter-group select {
        min-width: 140px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .nav-container {
        flex-direction: column;
        padding: 0;
    }
    
    .nav-brand {
        width: 100%;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.1rem;
    }
    
    .nav-menu {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu a {
        padding: 10px 14px;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .container {
        padding: 15px;
    }
    
    header {
        padding: 20px 10px 15px;
    }
    
    .search-container {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    #ticker-search {
        width: 100%;
        font-size: 1rem;
    }
    
    #search-button {
        width: 100%;
        padding: 12px;
    }
    
    /* Mobile filter styles */
    .filters-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .filter-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .filter-group label {
        font-size: 0.85rem;
    }
    
    .filter-group select {
        width: 100%;
        min-width: unset;
        padding: 12px 16px;
    }
    
    .filter-reset-btn {
        width: 100%;
        padding: 12px;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .summary-card {
        padding: 20px;
    }
    
    .card-icon {
        font-size: 2.5rem;
    }
    
    .card-number {
        font-size: 2rem;
    }
    
    .card-label {
        font-size: 0.9rem;
    }
    
    .card-description {
        font-size: 0.8rem;
    }
    
    .stocks-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stock-card-compact {
        padding: 12px;
    }
    
    .stock-symbol {
        font-size: 1.15rem;
    }
    
    .data-row {
        font-size: 0.82rem;
    }
    
    .failed-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }
    
    .failed-ticker-item {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .filtered-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }
    
    .filtered-ticker-item {
        padding: 8px 12px;
    }
    
    .filtered-ticker-link .ticker-symbol {
        font-size: 0.85rem;
    }
    
    .filter-explanation {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .page-info {
        flex-direction: column;
        gap: 8px;
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .pagination {
        gap: 6px;
        margin: 20px 0;
    }
    
    .page-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
        min-width: 36px;
    }
    
    .welcome-section {
        padding: 25px 20px;
    }
    
    .welcome-section h2 {
        font-size: 1.5rem;
    }
    
    .welcome-section h3 {
        font-size: 1.2rem;
    }
    
    .welcome-section p {
        font-size: 0.95rem;
    }
    
    .criteria-list li {
        font-size: 0.9rem;
        padding-left: 25px;
    }
    
    .ad-container {
        max-width: 100%;
        margin: 10px auto;
        padding: 5px;
    }
    
    .ad-container.ad-banner {
        min-height: 50px;
        max-height: 60px;
    }
    
    .ad-banner .adsbygoogle {
        max-height: 60px;
    }
    
    .ad-placeholder {
        padding: 15px;
        font-size: 0.8rem;
    }
    
    .export-content {
        padding: 15px;
    }
    
    .export-section {
        padding: 20px;
    }
    
    .export-section h2 {
        font-size: 1.3rem;
    }
    
    .export-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .export-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    
    footer {
        padding: 20px 10px;
        font-size: 0.85rem;
    }
    
    .timestamp {
        font-size: 0.8rem;
        padding: 6px 14px;
    }
}

/* Market Overview Styles */
.market-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.market-section h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.market-section p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 25px;
}

.vix-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-item {
    background: var(--bg-dark);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

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

.vix-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    padding: 15px;
    background: var(--bg-dark);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.legend-color.low {
    background: #10b981;
}

.legend-color.medium {
    background: #f59e0b;
}

.legend-color.high {
    background: #ef4444;
}

.sentiment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.sentiment-gauge {
    background: var(--bg-dark);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.sentiment-gauge:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.gauge-value {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 20px 0 10px;
}

.gauge-label {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sentiment-note {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.sentiment-gauge.extreme-fear .gauge-value {
    color: #ef4444;
}

.sentiment-gauge.extreme-fear .gauge-label {
    color: #ef4444;
}

.sentiment-gauge.fear .gauge-value {
    color: #f59e0b;
}

.sentiment-gauge.fear .gauge-label {
    color: #f59e0b;
}

.sentiment-gauge.neutral .gauge-value {
    color: #6b7280;
}

.sentiment-gauge.neutral .gauge-label {
    color: #6b7280;
}

.sentiment-gauge.greed .gauge-value {
    color: #10b981;
}

.sentiment-gauge.greed .gauge-label {
    color: #10b981;
}

.sentiment-gauge.extreme-greed .gauge-value {
    color: #10b981;
}

.sentiment-gauge.extreme-greed .gauge-label {
    color: #10b981;
}

/* Fear & Greed Scale Gauge */
.gauge-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 25px;
    text-align: center;
}

.scale-gauge {
    position: relative;
    margin: 30px 20px;
}

.scale-bar {
    display: flex;
    height: 40px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.scale-segment {
    flex: 1;
    transition: opacity 0.3s ease;
}

.extreme-fear-bg {
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.fear-bg {
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 100%);
}

.neutral-bg {
    background: linear-gradient(90deg, #f59e0b 0%, #6b7280 100%);
}

.greed-bg {
    background: linear-gradient(90deg, #6b7280 0%, #10b981 100%);
}

.extreme-greed-bg {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.scale-needle {
    position: absolute;
    top: -8px;
    width: 4px;
    height: 56px;
    background: white;
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: left 0.5s ease;
}

.scale-needle::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0 2px;
}

.gauge-value-display {
    text-align: center;
    margin: 25px 0 20px;
}

.gauge-current-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.gauge-current-label {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
}

.scale-legend {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.legend-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.gauge-placeholder {
    text-align: center;
    padding: 40px 20px;
}

.gauge-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Chart Viewer Styles */
.chart-search-container {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#chart-ticker-search {
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.05rem;
    width: 220px;
    text-transform: uppercase;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

#chart-ticker-search:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

#chart-search-button {
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#chart-search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.chart-info {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.candlestick-chart-container {
    position: relative;
    min-height: 500px;
    margin-bottom: 30px;
    background: var(--bg-dark);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.candlestick-chart-container > canvas {
    max-width: 100%;
    height: 500px !important;
}

.chart-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px;
    background: var(--bg-dark);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.chart-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* Extra small phones */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .nav-brand {
        font-size: 1rem;
        padding: 8px 0;
    }
    
    .nav-menu a {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .card-icon {
        font-size: 2rem;
    }
    
    .card-number {
        font-size: 1.8rem;
    }
    
    .stock-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .chart-btn {
        align-self: stretch;
        text-align: center;
        font-size: 0.75rem;
        padding: 5px 10px;
    }
    
    .badge {
        align-self: flex-start;
    }
    
    .page-btn {
        padding: 6px 8px;
        font-size: 0.8rem;
        min-width: 32px;
    }
    
    .page-ellipsis {
        padding: 0 4px;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .vix-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.6rem;
    }
    
    .vix-legend {
        gap: 15px;
        padding: 12px;
    }
    
    .legend-item {
        font-size: 0.85rem;
    }
    
    .legend-color {
        width: 20px;
        height: 20px;
    }
    
    .sentiment-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sentiment-gauge {
        padding: 20px;
    }
    
    .gauge-value {
        font-size: 2.5rem;
    }
    
    .gauge-label {
        font-size: 1rem;
    }
    
    .scale-gauge {
        margin: 20px 10px;
    }
    
    .scale-bar {
        height: 30px;
    }
    
    .scale-needle {
        height: 46px;
        top: -8px;
    }
    
    .gauge-current-value {
        font-size: 2.2rem;
    }
    
    .gauge-current-label {
        font-size: 1rem;
    }
    
    .scale-legend {
        flex-direction: column;
        gap: 8px;
    }
    
    .legend-label {
        font-size: 0.75rem;
    }
    
    .candlestick-chart-container {
        min-height: 350px;
        padding: 15px;
    }

    .candlestick-chart-container > canvas {
        height: 350px !important;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chart-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .chart-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .chart-legend {
        flex-direction: column;
        gap: 12px;
    }
}

/* ===========================
   Stock Comparison Styles
   =========================== */

.compare-selection-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.compare-selection-section h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.compare-search-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.compare-search-container input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

.compare-search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.compare-search-container button {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.compare-search-container button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.selected-stocks-container {
    min-height: 60px;
    padding: 15px;
    background: var(--bg-dark);
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.no-selection {
    color: var(--text-secondary);
    font-style: italic;
    width: 100%;
    text-align: center;
}

.stock-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--primary-color);
    border-radius: 20px;
    color: white;
    font-weight: 600;
}

.stock-chip-symbol {
    font-size: 1rem;
}

.stock-chip-remove {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.stock-chip-remove:hover {
    background: rgba(255, 255, 255, 0.3);
}

.compare-action-button {
    width: 100%;
    padding: 16px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.compare-action-button:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
}

.compare-action-button:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    opacity: 0.5;
}

.comparison-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.comparison-section h2 {
    color: var(--text-primary);
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.comparison-section h3 {
    color: var(--text-primary);
    margin: 30px 0 20px;
    font-size: 1.4rem;
}

.comparison-table-container {
    overflow-x: auto;
    margin-bottom: 30px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-dark);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.comparison-table td.metric-label {
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    width: 200px;
}

.comparison-table td {
    color: var(--text-primary);
    font-size: 1rem;
}

.comparison-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.status-hot {
    color: var(--hot-color);
    font-weight: 700;
}

.status-watch {
    color: var(--watch-color);
    font-weight: 700;
}

.status-other {
    color: var(--text-secondary);
    font-weight: 700;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.chart-wrapper {
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chart-title {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 700;
}

.chart-wrapper canvas {
    height: 300px !important;
}

/* Mobile Responsiveness for Comparison */
@media (max-width: 768px) {
    .compare-selection-section,
    .comparison-section {
        padding: 20px;
    }
    
    .compare-search-container {
        flex-direction: column;
    }
    
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 10px 8px;
    }
    
    .comparison-table td.metric-label {
        width: 120px;
        font-size: 0.85rem;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-wrapper canvas {
        height: 250px !important;
    }
}

/* ============================================ */
/* FAVORITES FEATURE STYLES                     */
/* ============================================ */

/* Favorite Star Icon */
.favorite-star {
    cursor: pointer;
    font-size: 1.3rem;
    color: #6b7280;
    transition: all 0.2s ease;
    user-select: none;
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
}

.favorite-star:hover {
    transform: scale(1.2);
    color: #fbbf24;
}

.favorite-star.is-favorite {
    color: #fbbf24;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.favorite-star.is-favorite:hover {
    color: #f59e0b;
}

/* Golden Cross / Death Cross Icons */
.cross-icon {
    font-size: 1.1rem;
    margin-right: 4px;
    display: inline-block;
    vertical-align: middle;
    cursor: help;
}

.cross-icon.golden-cross {
    color: #fbbf24;
    text-shadow: 0 0 6px rgba(251, 191, 36, 0.6);
    animation: golden-glow 2s ease-in-out infinite;
}

.cross-icon.death-cross {
    color: #ef4444;
    text-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

@keyframes golden-glow {
    0%, 100% { text-shadow: 0 0 6px rgba(251, 191, 36, 0.6); }
    50% { text-shadow: 0 0 12px rgba(251, 191, 36, 0.9); }
}

/* Candlestick Pattern Dots */
.pattern-dots-container {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.pattern-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.pattern-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: help;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pattern-dot:hover {
    transform: scale(1.3);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

.pattern-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.pattern-dot-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
}

.pattern-dot-yellow {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-color: #fbbf24;
}

.pattern-dot-orange {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    border-color: #fb923c;
}

.pattern-dot-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
}

.no-patterns {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Cup and Handle Pattern Icons */
.cup-handle-icon {
    display: inline-block;
    font-size: 1.2rem;
    margin-left: 4px;
    cursor: help;
    transition: transform 0.2s ease;
}

.cup-handle-icon:hover {
    transform: scale(1.2);
}

.cup-handle-confirmed {
    filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.5));
}

.cup-handle-forming {
    filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.5));
}

/* Chart page favorite star (larger) */
.chart-favorite-star {
    font-size: 1.5rem;
    margin-right: 10px;
}

/* No Favorites Message Container */
.no-favorites-container {
    text-align: center;
    padding: 60px 30px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 2px dashed var(--border-color);
    margin: 30px auto;
    max-width: 600px;
}

.no-favorites-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.no-favorites-container h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.no-favorites-container p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.no-favorites-container a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.no-favorites-container a:hover {
    text-decoration: underline;
}

/* Stock Badge for Hot/Watch in Favorites */
.stock-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hot-badge {
    background: rgba(239, 68, 68, 0.2);
    color: var(--hot-color);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.watch-badge {
    background: rgba(245, 158, 11, 0.2);
    color: var(--watch-color);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.filtered-badge {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.4);
}

/* Mobile responsiveness for favorites */
@media (max-width: 768px) {
    .favorite-star {
        font-size: 1.4rem;
        margin-right: 4px;
    }
    
    .chart-favorite-star {
        font-size: 1.6rem;
    }
    
    .no-favorites-container {
        padding: 40px 20px;
        margin: 20px 10px;
    }
    
    .no-favorites-icon {
        font-size: 3rem;
    }
    
    .no-favorites-container h2 {
        font-size: 1.4rem;
    }
    
    .stock-badge {
        font-size: 0.6rem;
        padding: 2px 6px;
    }
}

/* ============================================ */
/* ASSET PRICES GRID                            */
/* ============================================ */

.assets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.asset-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.asset-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.asset-card.loading {
    opacity: 0.6;
}

.asset-card.unavailable {
    opacity: 0.5;
}

.asset-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.asset-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.asset-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.asset-change {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Mobile responsiveness for assets grid */
@media (max-width: 900px) {
    .assets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .assets-grid {
        grid-template-columns: 1fr;
    }
    
    .asset-card {
        padding: 15px;
    }
    
    .asset-icon {
        font-size: 2rem;
    }
    
    .asset-price {
        font-size: 1.3rem;
    }
}

/* ============================================ */
/* MARKET SUMMARY (Home Page)                   */
/* ============================================ */

.market-summary-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.market-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #10b981);
}

.market-summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.market-summary-header h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0;
}

.market-summary-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-dark);
    padding: 4px 12px;
    border-radius: 20px;
}

.market-summary-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.market-summary-content strong {
    color: var(--text-primary);
}

.market-summary-content .highlight-fear {
    color: #ef4444;
    font-weight: 600;
}

.market-summary-content .highlight-greed {
    color: #10b981;
    font-weight: 600;
}

.market-summary-content .highlight-neutral {
    color: #6b7280;
    font-weight: 600;
}

.market-summary-content .highlight-gold {
    color: #fbbf24;
    font-weight: 600;
}

.market-summary-content .highlight-silver {
    color: #9ca3af;
    font-weight: 600;
}

.market-summary-content .highlight-bitcoin {
    color: #f7931a;
    font-weight: 600;
}

.market-summary-content .highlight-ethereum {
    color: #627eea;
    font-weight: 600;
}

.market-summary-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

.market-summary-error {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-style: italic;
}

@media (max-width: 768px) {
    .market-summary-card {
        padding: 20px;
    }
    
    .market-summary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .market-summary-content {
        font-size: 0.95rem;
    }
}

/* ============================================
   CHART VIEWER ENHANCEMENTS
   Date Range Selector, Fullscreen, Volume Chart
   ============================================ */

/* Date Range Selector */
.date-range-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.range-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.range-btn:hover {
    border-color: #3b82f6;
    color: var(--text-primary);
}

.range-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-color: transparent;
    color: white;
}

/* Fullscreen Button */
.fullscreen-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.fullscreen-btn:hover {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

/* Volume Chart Container */
.volume-chart-container {
    height: 120px;
    margin-top: 10px;
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid var(--border-color);
}

.volume-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* RSI Chart Container */
.rsi-chart-container {
    height: 120px;
    margin-top: 10px;
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid var(--border-color);
    position: relative;
}

.rsi-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.rsi-chart-container::before {
    content: 'RSI (14)';
    position: absolute;
    top: 5px;
    left: 10px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    z-index: 10;
}

/* Relative Strength Chart Container */
.rs-chart-container {
    height: 120px;
    margin-top: 10px;
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid var(--border-color);
    position: relative;
}

.rs-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.rs-chart-container::before {
    content: 'RS vs SPY';
    position: absolute;
    top: 5px;
    left: 10px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    z-index: 10;
}

/* Fullscreen Container Styles */
#chart-fullscreen-container {
    transition: all 0.3s ease;
}

#chart-fullscreen-container:fullscreen {
    background: var(--bg-dark);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

#chart-fullscreen-container:fullscreen #candlestickChart {
    flex: 1;
}

#chart-fullscreen-container:fullscreen .volume-chart-container {
    height: 150px;
}

/* CSS-based fullscreen for mobile devices */
#chart-fullscreen-container.mobile-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: var(--bg-dark) !important;
    padding: 15px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: auto !important;
}

#chart-fullscreen-container.mobile-fullscreen #candlestickChart {
    flex: 1;
    min-height: 60vh;
}

#chart-fullscreen-container.mobile-fullscreen .volume-chart-container {
    height: 120px;
}

#chart-fullscreen-container.mobile-fullscreen .rsi-chart-container {
    height: 100px;
}

/* Hide body scroll when mobile fullscreen is active */
body.fullscreen-active {
    overflow: hidden !important;
}

/* Enhanced Stats Grid */
.chart-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item {
    background: var(--bg-card);
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .date-range-selector {
        gap: 6px;
    }
    
    .range-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .fullscreen-btn {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
    }
    
    .chart-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-item {
        padding: 10px;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .volume-chart-container {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .range-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .chart-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* TradingView Link */
.tradingview-link-container {
    text-align: center;
    margin-bottom: 20px;
}

.tradingview-btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #2962ff 0%, #1e88e5 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tradingview-btn:hover {
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(41, 98, 255, 0.4);
}

/* ============================================
   STOCK NOTES FEATURE
   Modal, icons, and styling
   ============================================ */

/* Note Icon in Stock Cards */
.note-icon {
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.5;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.note-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.note-icon.has-note {
    opacity: 1;
    color: #f59e0b;
}

/* Note Modal */
.note-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.note-modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.note-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.note-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.note-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.note-modal-close:hover {
    color: #ef4444;
}

.note-modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

#note-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

#note-textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.note-last-updated {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.note-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
}

.note-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.note-btn-save {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.note-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.note-btn-cancel {
    background: var(--bg-dark);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.note-btn-cancel:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.note-btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 2px solid transparent;
    margin-right: auto;
}

.note-btn-delete:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.note-btn-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Note Modal */
@media (max-width: 480px) {
    .note-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .note-modal-footer {
        flex-wrap: wrap;
    }
    
    .note-btn {
        flex: 1;
        min-width: 100px;
    }
    
    .note-btn-delete {
        margin-right: 0;
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ============================================
   ENHANCED AD STYLES FOR BETTER VIEWABILITY
   ============================================ */

/* Improved ad container with better sizing */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    padding: 10px;
    width: 100%;
    max-width: 728px;
    box-sizing: border-box;
    min-height: 100px; /* Prevent layout shift */
}

.ad-banner {
    min-height: 90px;
    max-height: 280px; /* Allow larger responsive ads */
    background: transparent;
    border-radius: 8px;
    width: 100%;
    overflow: hidden;
}

.ad-banner .adsbygoogle {
    display: block;
    width: 100%;
}

/* Loaded state indicator */
.ad-container.ad-loaded {
    min-height: auto;
}

/* Sticky Anchor Ad - Bottom of Page */
.ad-sticky-anchor {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
    width: 100%;
    z-index: 9999;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    padding: 8px 10px;
    margin: 0;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ad-sticky-anchor .adsbygoogle {
    min-height: 50px;
    max-height: 100px;
    width: 100%;
    display: block;
}

.ad-sticky-close {
    position: absolute;
    top: -12px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10000;
}

.ad-sticky-close:hover {
    background: var(--hot-color);
    color: white;
    border-color: var(--hot-color);
}

/* In-Feed Ad Styling - Matches Stock Cards */
.ad-infeed {
    display: flex !important;
    justify-content: center;
    align-items: center;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    min-height: 200px;
    padding: 15px;
}

.ad-infeed .adsbygoogle {
    width: 100%;
    min-height: 180px;
}

/* Add padding to body to account for sticky ad */
body {
    padding-bottom: 120px; /* Space for sticky anchor ad */
}

/* Mobile Optimizations for Ads */
@media (max-width: 768px) {
    .ad-container {
        padding: 5px;
        margin: 15px auto;
    }
    
    .ad-banner {
        min-height: 60px;
        max-height: 120px;
    }
    
    .ad-sticky-anchor {
        padding: 5px;
    }
    
    .ad-sticky-anchor .adsbygoogle {
        max-height: 60px;
    }
    
    body {
        padding-bottom: 80px;
    }
    
    .ad-infeed {
        min-height: 150px;
    }
}

/* Hide sticky ad on very small screens where it takes too much space */
@media (max-height: 500px) {
    .ad-sticky-anchor {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
}

