:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --success-color: #4bb543;
    --warning-color: #f0ad4e;
    --danger-color: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f7ff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.app-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.app-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark-color);
}

.subtitle {
    color: var(--gray-color);
    font-size: 1.1rem;
}

.specs-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .specs-section {
        grid-template-columns: 1fr;
    }
}

.specs-card, .performance-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.specs-card:hover, .performance-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.specs-card h2, .performance-card h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.specs-card h2 i, .performance-card h2 i {
    color: var(--primary-color);
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 480px) {
    .specs-grid {
        grid-template-columns: 1fr;
    }
}

.spec-item {
    margin-bottom: 10px;
}

.spec-label {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 5px;
}

.spec-value {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--dark-color);
    word-break: break-word;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 15px;
}

.btn i {
    font-size: 0.9rem;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.refresh-btn {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.refresh-btn:hover {
    background-color: #f0f4ff;
}

.performance-meter {
    margin: 20px 0;
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: var(--gray-color);
}

.meter-bar {
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--danger-color), var(--warning-color), var(--success-color));
    border-radius: 10px;
    transition: width 1s ease;
}

.test-results {
    margin-top: 20px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: var(--border-radius);
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.result-item:last-child {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--primary-color);
}

.comparison-section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.comparison-section h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.comparison-section h2 i {
    color: var(--primary-color);
}

.comparison-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

@media (max-width: 576px) {
    .comparison-options {
        flex-direction: column;
    }
}

.custom-select {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    font-size: 1rem;
    color: var(--dark-color);
    background-color: white;
    transition: var(--transition);
}

.custom-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

.comparison-results {
    min-height: 100px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
}

.comparison-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.comparison-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.comparison-label {
    font-weight: 500;
}

.comparison-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.your-value {
    font-weight: 500;
}

.recommended-value {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.status-icon {
    font-size: 1rem;
}

.status-good {
    color: var(--success-color);
}

.status-warning {
    color: var(--warning-color);
}

.status-bad {
    color: var(--danger-color);
}

.tips-section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
}

.tips-section h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tips-section h2 i {
    color: var(--primary-color);
}

.tips-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.tip-card {
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tip-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tip-card h3 i {
    font-size: 1rem;
}

.tip-card p {
    font-size: 0.95rem;
    color: var(--dark-color);
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    color: var(--gray-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    padding: 25px;
    position: relative;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--dark-color);
}

#modal-title {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}