/* Index/Dashboard page styles */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --dark-color: #212529;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.card {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    border: none;
    transition: transform 0.3s ease;
    background: white;
}

.card:hover {
    transform: translateY(-5px);
}

.header-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header-card h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

#status {
    margin-top: 20px;
    font-weight: bold;
    font-size: 1.1rem;
}

.btn-test {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.btn-test:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-secondary {
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 600;
}

.metrics-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    flex: 1;
    transition: transform 0.3s ease;
}

.metrics-card:hover {
    transform: translateY(-5px);
}

.metrics-card h5 {
    margin-bottom: 20px;
    font-weight: 600;
    color: #495057;
}

.metric-item {
    margin-bottom: 20px;
}

.metric-item strong {
    color: #495057;
    font-size: 0.95rem;
}

.metric-value {
    color: #667eea;
    font-weight: 600;
}

.progress {
    height: 25px;
    border-radius: 15px;
    background: #e9ecef;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
    transition: width 0.6s ease;
}

.btn-outline-primary {
    border-radius: 20px;
    border: 2px solid white;
    color: white;
    font-weight: 600;
    padding: 8px 20px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: white;
    color: #667eea;
    transform: scale(1.05);
}

.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

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

.navbar-custom {
    background: white;
    border-radius: 15px;
    padding: 15px 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.navbar-custom .nav-link {
    color: #495057;
    font-weight: 600;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.navbar-custom .nav-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.navbar-custom .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
}

.navbar-brand {
    color: #495057;
}

.btn-outline-light {
    border-radius: 25px;
    font-weight: 600;
    border: 2px solid #667eea;
    color: #667eea;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

.content-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.control-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    flex: 0 0 280px;
    transition: transform 0.3s ease;
}

.control-card:hover {
    transform: translateY(-5px);
}

.control-card h5 {
    margin-bottom: 20px;
    font-weight: 600;
    color: #495057;
}

.vpn-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* CPU Cores styles */
.cpu-cores {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.cpu-core-item {
    display: flex;
    flex-direction: column;
}

.cpu-core-item .core-label {
    font-size: 0.75em;
    color: #6c757d;
    margin-bottom: 2px;
}

.cpu-core-item .progress {
    height: 16px;
    margin-top: 0;
    position: relative;
    overflow: visible;
}

.cpu-core-item .progress::after {
    content: attr(data-label);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #212529;
    font-weight: 600;
    pointer-events: none;
    z-index: 1;
}

.cpu-core-item .progress-bar {
    font-size: 0;
    line-height: 16px;
}

/* ========================================
   MOBILE RESPONSIVE (< 576px)
   ======================================== */
@media (max-width: 575px) {
    body {
        padding: 12px;
    }

    .header-card {
        padding: 20px 15px;
    }

    .header-card h1 {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }

    .btn-test {
        width: 100%;
        margin-bottom: 10px;
    }

    .cpu-cores {
        grid-template-columns: 1fr;
    }

    .metrics-card {
        padding: 20px 15px;
    }

    .control-card {
        padding: 20px 15px;
        flex: 1 1 auto;
    }

    .content-container {
        flex-direction: column;
    }
}

/* ========================================
   TABLET (576px - 991px)
   ======================================== */
@media (min-width: 576px) and (max-width: 991px) {
    .cpu-cores {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-card h1 {
        font-size: 2rem;
    }
}

/* ========================================
   LANDSCAPE MOBILE (height < 500px)
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 10px;
    }

    .header-card {
        padding: 15px;
    }

    .header-card h1 {
        font-size: 1.5rem;
    }

    .metrics-card,
    .control-card {
        padding: 15px;
    }
}
