:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #4cc9f0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4bb543;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px 30px;
    text-align: center;
    position: relative;
}

.online-status {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success-color);
    animation: pulse 2s infinite;
}

.status-dot.offline {
    background-color: var(--danger-color);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 30px;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.card-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: #555;
    flex-shrink: 0;
    margin-right: 10px;
}

.info-value {
    font-weight: 600;
    color: var(--dark-color);
    text-align: right;
    word-break: break-word;
    flex: 1;
}

.ip-address {
    font-family: monospace;
    background: rgba(67, 97, 238, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
    color: var(--primary-color);
}

.local-ip {
    font-family: monospace;
    background: rgba(76, 201, 240, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
    color: var(--accent-color);
}

.server-info {
    font-family: monospace;
    background: rgba(75, 181, 67, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
    color: var(--success-color);
}

.cookie-domain {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 2px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
}

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

.btn-success:hover {
    background: #3d8b40;
}

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

.btn-danger:hover {
    background: #bd2130;
}

.btn-warning {
    background: var(--warning-color);
    color: #000;
}

.btn-warning:hover {
    background: #e0a800;
}

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

.btn-info:hover {
    background: #35b0d6;
}

.cookie-list, .sw-list {
    max-height: 200px;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 0.85rem;
}

.storage-item, .sw-item {
    background: white;
    padding: 8px;
    margin: 5px 0;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
    font-size: 0.85rem;
}

.sw-item.active {
    border-left-color: var(--success-color);
}

.sw-item.inactive {
    border-left-color: #6c757d;
}

.cookie-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.8rem;
}

.speed-test-progress {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin: 10px 0;
    overflow: hidden;
}

.speed-test-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4cc9f0, #4361ee);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.footer {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 0.9rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.refresh-btn {
    display: block;
    margin: 20px auto;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.refresh-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.note {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

.security-note {
    font-size: 0.75rem;
    color: var(--danger-color);
    margin-top: 5px;
    font-style: italic;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 5px;
}

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

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

.status-unknown {
    background: var(--warning-color);
    color: black;
}

.db-status {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 5px;
}

@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    header {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .info-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .info-value {
        text-align: left;
    }
}
