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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ea6671 0%, #4b98a2 100%);
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
}

.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.redis-badge {
    background: #dc382d;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

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

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: white;
    font-size: 0.9rem;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff88;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.main-container {
    display: grid;
    grid-template-columns: 300px 1fr 350px;
    gap: 1rem;
    padding: 1rem;
    height: calc(100vh - 80px);
}

.sidebar,
.metrics-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.content-area {
    display: grid;
    grid-template-rows: 1fr 300px;
    gap: 1rem;
}

.training-dashboard,
.cache-analytics {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.model-config {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.config-group {
    background: #f8f9ff;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.config-label {
    font-size: 0.9rem;
    color: #666;
}

.config-value {
    font-weight: bold;
    color: #333;
}

.btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.metric-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.metric-card.secondary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.metric-card.success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.metric-label {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 0.3rem;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: bold;
}

.chart-container {
    position: relative;
    height: 200px;
    margin: 1rem 0;
}

.cache-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.cache-stat {
    text-align: center;
    background: #f8f9ff;
    padding: 1rem;
    border-radius: 8px;
}

.cache-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.cache-stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.3rem;
}

.optimization-suggestions {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.suggestion {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.suggestion-icon {
    color: #ffc107;
    font-weight: bold;
}

.vector-search-results {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 1rem;
}

.similar-model {
    background: #e8f4fd;
    padding: 0.8rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    border-left: 3px solid #0066cc;
}

.model-similarity {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    justify-content: space-between;
}

.training-log {
    background: #1a1a1a;
    color: #00ff88;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    height: 150px;
    overflow-y: auto;
    margin-top: 1rem;
}

.log-entry {
    margin-bottom: 0.3rem;
}

.timestamp {
    color: #666;
}

.error {
    color: #ff6b6b;
}

.success {
    color: #51cf66;
}

.warning {
    color: #ffd43b;
}