/* Monitoring & Alerts Styles - Advanced Cyber Theme */

:root {
    /* Primary Colors - Advanced Cyber Theme */
    --primary-color: #00ff88;
    --primary-dark: #00cc66;
    --primary-light: #33ffaa;
    --secondary-color: #0a0a0f;
    --accent-color: #ff3366;
    --accent-secondary: #3366ff;
    --accent-warning: #ffaa00;

    /* Status Colors */
    --success-color: #00ff88;
    --warning-color: #ffaa00;
    --danger-color: #ff3366;
    --info-color: #3366ff;
    --critical-color: #ff0044;

    /* Dark Theme Background Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: rgba(26, 26, 46, 0.85);
    --bg-card-hover: rgba(26, 26, 46, 0.95);
    --bg-input: rgba(10, 10, 15, 0.9);
    --bg-alert: rgba(255, 51, 102, 0.1);
    --bg-success: rgba(0, 255, 136, 0.1);
    --bg-warning: rgba(255, 170, 0, 0.1);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b8c5d6;
    --text-muted: #7c8db5;
    --text-accent: #00ff88;
    --text-danger: #ff3366;
    --text-warning: #ffaa00;

    /* Border and Shadow */
    --border-color: rgba(0, 255, 136, 0.2);
    --border-hover: rgba(0, 255, 136, 0.4);
    --border-danger: rgba(255, 51, 102, 0.3);
    --border-warning: rgba(255, 170, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 255, 136, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 255, 136, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 255, 136, 0.2);
    --shadow-glow: 0 0 20px rgba(0, 255, 136, 0.3);
    --shadow-danger: 0 0 20px rgba(255, 51, 102, 0.3);
    --shadow-warning: 0 0 20px rgba(255, 170, 0, 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, #00ff88 0%, #00cc66 100%);
    --gradient-danger: linear-gradient(135deg, #ff3366 0%, #ff0044 100%);
    --gradient-warning: linear-gradient(135deg, #ffaa00 0%, #ff8800 100%);
    --gradient-card: linear-gradient(135deg, rgba(26, 26, 46, 0.85) 0%, rgba(22, 33, 62, 0.85) 100%);
    --gradient-alert: linear-gradient(135deg, rgba(255, 51, 102, 0.1) 0%, rgba(255, 0, 68, 0.1) 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 fixed background that affects 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: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

.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, 255, 136, 0.3);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.marketgaze-header h2::before {
    content: '⚡';
    font-size: 2.5rem;
    filter: drop-shadow(0 0 15px rgba(0, 255, 136, 0.5));
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 15px rgba(0, 255, 136, 0.5)); }
    to { filter: drop-shadow(0 0 25px rgba(0, 255, 136, 0.8)); }
}

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

/* Tab Navigation */
.monitoring-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
    background: var(--gradient-card);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.tab-button {
    background: none;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    flex: 1;
    text-align: center;
}

.tab-button:hover {
    color: var(--primary-color);
    background: rgba(0, 255, 136, 0.1);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(0, 255, 136, 0.15);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

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

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

/* Section Styles */
.alerts-section,
.health-section,
.recommendations-section {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

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

.section-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Alert Status */
.alert-status {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.status-indicator {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.status-indicator.good {
    background: var(--bg-success);
    color: var(--success-color);
    border: 2px solid var(--success-color);
    box-shadow: var(--shadow-glow);
}

.status-indicator.good::before {
    background: var(--success-color);
}

.status-indicator.attention {
    background: var(--bg-warning);
    color: var(--warning-color);
    border: 2px solid var(--warning-color);
    box-shadow: var(--shadow-warning);
}

.status-indicator.attention::before {
    background: var(--warning-color);
}

.status-indicator.warning {
    background: var(--bg-alert);
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
    box-shadow: var(--shadow-danger);
}

.status-indicator.warning::before {
    background: var(--danger-color);
}

.status-indicator.critical {
    background: linear-gradient(135deg, rgba(255, 0, 68, 0.2), rgba(255, 51, 102, 0.2));
    color: var(--critical-color);
    border: 3px solid var(--critical-color);
    box-shadow: 0 0 30px rgba(255, 0, 68, 0.4);
    animation: criticalBlink 1.5s ease-in-out infinite;
}

.status-indicator.critical::before {
    background: var(--critical-color);
    animation: statusPulse 0.8s ease-in-out infinite;
}

@keyframes criticalBlink {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 0, 68, 0.4); }
    50% { box-shadow: 0 0 40px rgba(255, 0, 68, 0.7); }
}

/* Alert Items */
.alerts-container,
.recommendations-container {
    margin-bottom: 40px;
}

.alert-item,
.recommendation-item {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.alert-item::before,
.recommendation-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transition: var(--transition);
}

.alert-item:hover,
.recommendation-item:hover {
    transform: translateX(5px) translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.alert-item:hover::before,
.recommendation-item:hover::before {
    width: 8px;
    box-shadow: 0 0 15px currentColor;
}

.alert-item.high {
    border-left-color: var(--danger-color);
    background: var(--gradient-alert);
    border-color: var(--border-danger);
}

.alert-item.high::before {
    background: var(--gradient-danger);
}

.alert-item.medium {
    border-left-color: var(--warning-color);
    background: var(--bg-warning);
    border-color: var(--border-warning);
}

.alert-item.medium::before {
    background: var(--gradient-warning);
}

.alert-item.low {
    border-left-color: var(--success-color);
    background: var(--bg-success);
}

.alert-item.low::before {
    background: var(--gradient-primary);
}

.alert-header,
.recommendation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 15px;
}

.alert-title,
.recommendation-title {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    font-size: 1.1rem;
}

.alert-severity,
.recommendation-priority {
    background: var(--text-secondary);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.alert-severity.high {
    background: var(--danger-color);
}

.alert-severity.medium {
    background: var(--warning-color);
}

.alert-severity.low {
    background: var(--success-color);
}

.alert-message,
.recommendation-description {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.alert-timestamp {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.alert-actions,
.recommendation-actions {
    margin-top: 15px;
}

/* Alert Filters */
.alert-filters {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-top: 30px;
}

.alert-filters h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.filter-options {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.filter-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Health Overview */
.health-overview {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.health-score-card {
    text-align: center;
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 50px 35px;
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.health-score-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0.8;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-color) 0deg, rgba(0, 255, 136, 0.2) 0deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    position: relative;
    box-shadow: var(--shadow-glow), inset 0 0 30px rgba(0, 255, 136, 0.1);
    border: 3px solid rgba(0, 255, 136, 0.3);
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 110px;
    height: 110px;
    background: var(--bg-secondary);
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 136, 0.2);
}

.score-circle::after {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 136, 0.1);
    animation: scoreRotate 10s linear infinite;
}

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

.score-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    z-index: 1;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.score-label {
    font-size: 0.9rem;
    color: var(--text-accent);
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.score-status {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

/* Health Factors */
.health-factors {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.factor-card {
    background: var(--light-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.factor-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.factor-score {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.factor-bar {
    width: 100%;
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
}

.factor-progress {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.8s ease;
    border-radius: 5px;
}

.factor-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Health Details */
.health-details {
    background: var(--light-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.health-details h4 {
    margin-top: 0;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
}

/* Recommendation Categories */
.recommendation-categories {
    background: var(--light-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-top: 30px;
}

.recommendation-categories h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.category-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.category-btn {
    background: white;
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-primary);
}

.category-btn:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

.category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Loading Message */
.loading-message {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin: 0 5px;
    transition: var(--transition);
    text-align: center;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

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

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .marketgaze-container {
        padding: 15px;
    }
    
    .marketgaze-header h2 {
        font-size: 2rem;
    }
    
    .monitoring-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        text-align: left;
        border-bottom: 1px solid var(--border-color);
    }
    
    .tab-button.active {
        border-bottom-color: var(--border-color);
        border-left: 3px solid var(--primary-color);
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .health-overview {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .filter-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .category-filters {
        justify-content: center;
    }
    
    .alert-header,
    .recommendation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
