/* Stock Screening & Ranking Styles - Modern Dark Theme */

:root {
    /* Primary Colors - Cyber Blue Theme */
    --primary-color: #00d4ff;
    --primary-dark: #0099cc;
    --primary-light: #33ddff;
    --secondary-color: #1a1a2e;
    --accent-color: #ff6b6b;
    --accent-secondary: #4ecdc4;

    /* Status Colors */
    --success-color: #00ff88;
    --warning-color: #ffaa00;
    --danger-color: #ff4757;
    --info-color: #00d4ff;

    /* Dark Theme Background Colors */
    --bg-primary: #0f0f23;
    --bg-secondary: #16213e;
    --bg-tertiary: #1a1a2e;
    --bg-card: rgba(22, 33, 62, 0.8);
    --bg-card-hover: rgba(22, 33, 62, 0.95);
    --bg-input: rgba(15, 15, 35, 0.9);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b8c5d6;
    --text-muted: #7c8db5;
    --text-accent: #00d4ff;

    /* Border and Shadow */
    --border-color: rgba(0, 212, 255, 0.2);
    --border-hover: rgba(0, 212, 255, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 212, 255, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 212, 255, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 212, 255, 0.2);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);

    /* Effects */
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    --gradient-secondary: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --gradient-card: linear-gradient(135deg, rgba(22, 33, 62, 0.8) 0%, rgba(26, 26, 46, 0.8) 100%);
}

.marketgaze-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: transparent;
    min-height: 100vh;
    position: relative;
}

/* Remove the fixed background that affects the footer */

.marketgaze-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    position: relative;
}

.marketgaze-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.marketgaze-header h2 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    letter-spacing: -0.02em;
}

.marketgaze-header .description {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin: 0 0 20px 0;
    font-weight: 400;
    opacity: 0.9;
}

.analysis-disclaimer {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 212, 255, 0.1));
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.analysis-disclaimer p {
    color: var(--text-primary);
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.analysis-disclaimer strong {
    color: var(--success-color);
}

/* Screening Filters */
.screening-filters {
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.95), rgba(22, 33, 62, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 35px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.screening-filters::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.8;
}

.screening-filters h3 {
    margin-top: 0;
    color: var(--text-primary);
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.screening-filters h3::before {
    content: '🔍';
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.filter-group {
    position: relative;
}

.filter-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-accent);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label::before {
    content: '▶';
    font-size: 0.7rem;
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.filter-group:hover label::before {
    transform: rotate(90deg);
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-input);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
    background: rgba(15, 15, 35, 0.95);
    transform: translateY(-2px);
}

.filter-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.filter-group small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0.8;
}

.filter-actions {
    text-align: center;
    margin-top: 30px;
}

/* Modern Cyber Buttons */
.btn {
    padding: 15px 30px;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 8px 8px 0;
    transition: var(--transition);
    text-align: center;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
    border-color: var(--primary-light);
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #00cc77);
    color: var(--bg-primary);
    border-color: var(--success-color);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #ff9900);
    color: var(--bg-primary);
    border-color: var(--warning-color);
    box-shadow: 0 4px 15px rgba(255, 170, 0, 0.3);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 170, 0, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), var(--primary-dark));
    color: var(--bg-primary);
    border-color: var(--info-color);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-info:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.btn:disabled {
    background: var(--bg-secondary);
    color: var(--text-muted);
    border-color: var(--border-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.5;
}

.btn:disabled::before {
    display: none;
}

/* Results Section */
.screening-results,
.allocation-results {
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.95), rgba(22, 33, 62, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    padding: 35px;
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.screening-results::before,
.allocation-results::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0.8;
}

.results-header,
.allocation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h3,
.allocation-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.results-summary,
.allocation-summary {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
    background: var(--light-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.summary-item label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: 500;
}

.summary-item span {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* Modern Data Tables */
.results-table-container,
.allocation-table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stocks-table,
.allocation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: transparent;
    color: var(--text-primary);
}

.stocks-table th,
.stocks-table td,
.allocation-table th,
.allocation-table td {
    padding: 18px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    transition: var(--transition-fast);
}

.stocks-table th,
.allocation-table th {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    font-weight: 700;
    color: var(--text-accent);
    position: sticky;
    top: 0;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--primary-color);
}

.stocks-table tbody tr,
.allocation-table tbody tr {
    transition: var(--transition-fast);
}

.stocks-table tbody tr:hover,
.allocation-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.05);
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.1);
}

.stocks-table tbody tr:nth-child(even),
.allocation-table tbody tr:nth-child(even) {
    background: rgba(22, 33, 62, 0.3);
}

.stocks-table td strong,
.allocation-table td strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* Checkboxes */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Modern Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 50px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.spinner {
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.loading-spinner p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .filter-row {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .marketgaze-container {
        padding: 20px 15px;
    }

    .marketgaze-header h2 {
        font-size: 2.2rem;
    }

    .marketgaze-header .description {
        font-size: 1rem;
    }

    .filter-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .screening-filters,
    .screening-results,
    .allocation-results {
        padding: 25px 20px;
    }

    .results-header,
    .allocation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .results-summary,
    .allocation-summary {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .summary-item {
        flex: 1;
        min-width: 120px;
    }

    .btn {
        width: 100%;
        margin: 8px 0;
        padding: 18px 25px;
        font-size: 1.1rem;
    }

    .filter-actions .btn {
        width: auto;
        margin: 8px 5px;
        min-width: 140px;
    }

    .results-table-container,
    .allocation-table-container {
        font-size: 0.9rem;
    }

    .stocks-table th,
    .stocks-table td,
    .allocation-table th,
    .allocation-table td {
        padding: 12px 8px;
    }
}

@media (max-width: 480px) {
    .marketgaze-header h2 {
        font-size: 1.8rem;
    }

    .screening-filters h3 {
        font-size: 1.5rem;
    }

    .filter-group input,
    .filter-group select {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .btn {
        padding: 15px 20px;
        font-size: 1rem;
    }

    .summary-item {
        min-width: 100px;
        padding: 8px 12px;
    }
}
