/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* CSS Variables for Dark Navy Blue Gradient Theme */
:root {
    --bg-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --bg-secondary: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    --bg-tertiary: linear-gradient(135deg, #334155 0%, #475569 50%, #64748b 100%);
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-hover: rgba(255, 255, 255, 1);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #ffffff;
    --border-color: rgba(15, 23, 42, 0.2);
    --border-light: rgba(15, 23, 42, 0.1);
    --primary-color: #1e293b;
    --primary-hover: #334155;
    --success-color: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --danger-color: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --warning-color: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --info-color: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    --shadow: 0 4px 6px rgba(15, 23, 42, 0.15);
    --shadow-lg: 0 10px 15px rgba(15, 23, 42, 0.25);
    --radius: 12px;
    --radius-sm: 6px;
    --radius-lg: 16px;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar {
    background: #1e293b;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.nav-brand h1 {
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    opacity: 0.8;
}

.nav-link:hover {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.nav-link.active {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 1;
    font-weight: 600;
}

/* Pages */
.page {
    display: none;
    flex: 1;
    padding: 1rem;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 0rem 0;
    border-bottom: 1px solid var(--border-color);
    max-width: 95%;
    width: 95%;
    margin-left: auto;
    margin-right: auto;
}

.page-header h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 600;
}

.last-updated {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

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

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

.btn-secondary {
    background-color: #475569;
    color: white;
    border: 1px solid #475569;
}

.btn-secondary:hover {
    background-color: #64748b;
    border-color: #64748b;
}

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

.btn-danger:hover {
    background-color: #c82333;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

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

.btn-success:hover {
    background-color: #0d8b5c;
}

/* Main Table Container */
.main-table-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.5rem;
    width: 95%;
}

.table-card {
    background: var(--bg-card);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stocks-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    font-size: 0.9rem;
}

.stocks-table thead {
    background: var(--bg-tertiary);
    color: var(--text-light);
}

.stocks-table th {
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.stocks-table th:first-child {
    text-align: center;
    width: 60px;
}

.stocks-table th:nth-child(2) {
    width: 80px;
}

.stocks-table th:nth-child(3),
.stocks-table th:nth-child(4),
.stocks-table th:nth-child(5) {
    width: 90px;
    text-align: right;
}

.stocks-table th:nth-child(n+6) {
    width: 80px;
    text-align: center;
}

.stocks-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.stocks-table td:first-child {
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
}

.stocks-table td:nth-child(2) {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.stocks-table td:nth-child(3),
.stocks-table td:nth-child(4),
.stocks-table td:nth-child(5) {
    text-align: right;
    font-weight: 500;
}

.stocks-table td:nth-child(n+6) {
    text-align: center;
    font-size: 1.2rem;
}

.stocks-table tbody tr:hover {
    background-color: rgba(30, 41, 59, 0.05);
}

.stocks-table tbody tr:nth-child(even) {
    background-color: rgba(30, 41, 59, 0.02);
}

.stocks-table tbody tr:nth-child(even):hover {
    background-color: rgba(30, 41, 59, 0.08);
}

/* Criteria indicators */
.criteria-check {
    color: var(--success-color);
    font-weight: bold;
}

.criteria-cross {
    color: var(--danger-color);
    font-weight: bold;
}

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

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

.score-badge {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
}

/* Clickable Ticker */
.ticker-clickable {
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    transition: all 0.2s ease;
}

.ticker-clickable:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Debug Row */
.debug-row {
    background-color: rgba(30, 41, 59, 0.05);
}

.debug-cell {
    padding: 0 !important;
    border: none !important;
}

.debug-content {
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    margin: 0.5rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
}

.debug-content h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

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

.debug-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.debug-item strong {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.debug-pass {
    color: var(--success-color);
    font-weight: 500;
}

.debug-fail {
    color: var(--danger-color);
    font-weight: 500;
}

/* Top Tickers */
.top-ticker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.ticker-symbol {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

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

.ticker-score {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
}

/* Criteria Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.grid-header {
    display: contents;
}

.grid-header .grid-cell {
    background-color: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

.grid-cell {
    padding: 0.75rem 0.5rem;
    background-color: var(--bg-primary);
    text-align: center;
    font-size: 0.9rem;
    border: none;
}

.criteria-met {
    background-color: var(--success-color) !important;
    color: white;
}

.criteria-not-met {
    background-color: var(--text-muted) !important;
    color: white;
}

/* Ticker List Page */
.ticker-controls-left {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.ticker-controls-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Main Content Grid */
.main-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    height: calc(100vh - 200px);
    min-height: 600px;
}

.tradingview-container,
.economic-calendar-container {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.tradingview-container h3,
.economic-calendar-container h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.tradingview-widget-container {
    flex: 1;
    min-height: 580px;
}

.tradingview-widget-container__widget {
    width: 100%;
    height: 100%;
}

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

.ticker-input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 200px;
}

.ticker-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(30, 41, 59, 0.25);
}

.ticker-list-container {
    margin-bottom: 2rem;
}

.ticker-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.list-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#ticker-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ticker-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.ticker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.ticker-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    background: var(--bg-card-hover);
}

.ticker-item.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--text-light);
}

.ticker-info {
    display: flex;
    flex-direction: column;
}

.ticker-symbol-large {
    font-weight: 600;
    font-size: 1.1rem;
    color: inherit;
}

.ticker-details {
    font-size: 0.8rem;
    color: inherit;
    opacity: 0.8;
}

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

.ticker-actions button {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
}

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

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

/* Visualization */
.visualization-container {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.ticker-cloud {
    height: 400px;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
}

/* News Debug Page */
.news-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.ticker-select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.news-container {
    max-width: 95%;
    width: 95%;
    margin: 0 auto;
}

.news-results {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}


.news-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.news-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.news-summary {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-sentiment {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.sentiment-positive {
    background-color: var(--success-bg);
    color: var(--success-color);
}

.sentiment-negative {
    background-color: var(--danger-bg);
    color: var(--danger-color);
}

.sentiment-neutral {
    background-color: var(--info-bg);
    color: var(--info-color);
}

/* News Ticker Header */
.news-ticker-header {
    margin: 1.5rem 0 1rem 0;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
}

.news-ticker-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

/* News Meta Information */
.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.news-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(5px);
}

.edit-list-modal-content {
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content {
    background: var(--bg-card);
    margin: 15% auto;
    padding: 0;
    border-radius: var(--radius-lg);
    width: 80%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

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

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.close {
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body textarea {
    width: 100%;
    height: 150px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
}

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

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-overlay p {
    color: white;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .page {
        padding: 0.5rem;
    }
    
    .page-header {
        max-width: 98%;
        width: 98%;
    }
    
    .news-container {
        max-width: 98%;
        width: 98%;
    }
    
    .main-table-container {
        padding: 0.25rem;
        width: 98%;
    }
    
    .table-card {
        padding: 0.25rem;
    }
    
    .stocks-table {
        font-size: 0.8rem;
    }
    
    .stocks-table th,
    .stocks-table td {
        padding: 0.5rem 0.25rem;
    }
    
    
    .ticker-controls-left,
    .ticker-controls-right {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .ticker-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .debug-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .debug-content {
        padding: 0.75rem 1rem;
        margin: 0.25rem;
    }

/* Password Input */
.password-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.password-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(30, 41, 59, 0.25);
}

/* Error Message */
.error-message {
    color: var(--danger-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Edit Controls */
.edit-controls {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.05);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.edit-controls-top {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    justify-content: flex-start;
}

.edit-controls-bottom {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-start;
}

/* Edit modal specific button styles */
.edit-controls .btn {
    height: 36px;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border-radius: 6px;
}

.edit-controls .btn-small {
    height: 32px;
    min-width: 70px;
    font-size: 0.8rem;
}

/* Ticker Grid */
.ticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.ticker-grid-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    cursor: pointer;
}

.ticker-grid-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.ticker-grid-item.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--text-light);
}

.ticker-grid-item .ticker-symbol {
    font-weight: 600;
    font-size: 1rem;
}

.ticker-grid-item .ticker-remove {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticker-grid-item .ticker-remove:hover {
    background: #c82333;
}

/* Responsive adjustments for main content grid */
@media (max-width: 768px) {
    .main-content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        height: auto;
    }
    
    .tradingview-widget-container {
        min-height: 400px;
    }
    
    .edit-controls-top {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .edit-controls-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .ticker-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }
}
}

/* Options Page Styles */
.options-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.options-input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.options-ticker-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 250px;
}

.options-ticker-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.15);
    transform: translateY(-1px);
}

.options-ticker-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

#scan-options-btn {
    position: relative;
    padding: 0.75rem 2rem;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-loader {
    display: none;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.options-container {
    max-width: 95%;
    width: 95%;
    margin: 0 auto;
}

.options-results {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    min-height: 400px;
}

.options-welcome {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.options-welcome h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.options-welcome p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

.options-header {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
}

.options-header h3 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.underlying-price {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.scanned-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.best-options-section {
    margin-bottom: 2rem;
}

.best-options-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

.best-option-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.best-option-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.best-option-card.call {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.02) 100%);
}

.best-option-card.put {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(239, 68, 68, 0.02) 100%);
}

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

.type-icon {
    font-size: 1.5rem;
}

.type-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.yield-display {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
}

.yield-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.yield-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.25rem;
    opacity: 0.8;
}

.option-details {
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: var(--text-secondary);
    font-weight: 500;
}

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

.yahoo-link {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.2s ease;
}

.yahoo-link:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.options-tables-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.options-table-container h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.table-description {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.options-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.options-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    font-size: 0.9rem;
}

.options-table thead {
    background: var(--bg-tertiary);
    color: var(--text-light);
}

.options-table th {
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.options-table th:nth-child(1),
.options-table th:nth-child(3),
.options-table th:nth-child(4) {
    text-align: right;
}

.options-table th:nth-child(6) {
    text-align: center;
}

.options-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.options-table td:nth-child(1),
.options-table td:nth-child(3),
.options-table td:nth-child(4) {
    text-align: right;
    font-weight: 600;
}

.options-table td:nth-child(6) {
    text-align: center;
}

.options-table tbody tr:hover {
    background-color: rgba(30, 41, 59, 0.05);
}

.view-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.view-link:hover {
    background: var(--primary-color);
    color: white;
}

.options-error {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.options-error h3 {
    color: var(--danger-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.options-error p {
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

/* Cache Notice */
.cache-notice {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    animation: slideInDown 0.3s ease-out;
}

.cache-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cache-icon {
    font-size: 1.2rem;
}

.cache-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    min-width: 200px;
}

.cache-notice .btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

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

/* Cache Indicator */
.cache-indicator {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--info-color);
    margin-top: 0.5rem;
    animation: fadeIn 0.2s ease-out;
}

.cache-indicator-icon {
    font-size: 1rem;
}

.cache-indicator-text {
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design for Options */
@media (max-width: 768px) {
    .input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .options-ticker-input {
        min-width: auto;
        width: 100%;
    }
    
    .best-options-grid {
        grid-template-columns: 1fr;
    }
    
    .options-tables-section {
        grid-template-columns: 1fr;
    }
    
    .options-table {
        font-size: 0.8rem;
    }
    
    .options-table th,
    .options-table td {
        padding: 0.5rem 0.25rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
