/* Mouse Acceleration Checker Specific Styles */

/* Test Tabs */
.test-tabs {
    display: flex;
    background-color: #f1f3f5;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
    border-radius: 6px 6px 0 0;
    overflow: hidden;
}

.test-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
    position: relative;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    flex: 1;
    text-align: center;
}

.test-tab:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: #212529;
}

.test-tab.active {
    color: #3498db;
    background-color: #fff;
    border-bottom: 3px solid #3498db;
    font-weight: 600;
}

/* Test Content */
.test-content {
    display: none;
    padding: 25px;
    background-color: #fff;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.test-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.test-description {
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
    padding-left: 15px;
}

.test-description h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 20px;
}

.test-description p {
    margin: 0;
    color: #6c757d;
    font-size: 15px;
    line-height: 1.5;
}

/* Visual Test Area */
.acceleration-test-area {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    position: relative;
    min-height: 300px;
    border: 1px solid #e9ecef;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.test-instructions-container {
    width: 100%;
    margin-bottom: 25px;
}

.test-instructions {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.instruction-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 150px;
}

.instruction-number {
    width: 36px;
    height: 36px;
    background-color: #3498db;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
}

.instruction-text {
    font-size: 14px;
    line-height: 1.4;
    color: #495057;
}

.test-markers {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 50px;
}

.start-marker, .end-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.start-marker i, .end-marker i {
    font-size: 24px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

/* Pulse animation for start marker */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pulse-animation {
    animation: pulse 2s infinite ease-in-out;
}

.start-marker i {
    color: #3498db;
}

.end-marker i {
    color: #e74c3c;
}

.start-marker span, .end-marker span {
    font-weight: 500;
    color: #495057;
}

.path-visualization {
    position: relative;
    height: 180px;
    margin: 20px 0;
    border: 1px dashed #dee2e6;
    border-radius: 6px;
    background-color: #fff;
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.05);
    background-image: linear-gradient(rgba(52, 152, 219, 0.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(52, 152, 219, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    overflow: hidden;
}

.path-label {
    position: absolute;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0.9;
    font-weight: 500;
}

.slow-path {
    top: 10px;
    left: 10px;
    background-color: rgba(52, 152, 219, 0.2);
    color: #2980b9;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.fast-path {
    top: 10px;
    right: 10px;
    background-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.test-results {
    margin-top: 25px;
    text-align: center;
}

.result-message {
    font-size: 16px;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 6px;
    background-color: #e9ecef;
    display: inline-block;
    min-width: 60%;
}

.result-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Distance Test */
.measurement-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background-color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.speed-selector {
    display: flex;
    align-items: center;
}

.speed-selector label {
    margin-right: 10px;
    font-weight: 500;
    color: #495057;
}

.speed-selector select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    background-color: #fff;
    color: #495057;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.speed-selector select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.test-counter {
    font-weight: 600;
    color: #495057;
    background-color: #e9ecef;
    padding: 6px 12px;
    border-radius: 4px;
}

.distance-test-container {
    position: relative;
    height: 180px;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-bottom: 25px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
}

.start-point, .end-point {
    position: relative;
    text-align: center;
}

.start-point {
    left: 50px;
}

.end-point {
    right: 50px;
}

.start-point i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
    color: #3498db;
}

.start-point span, .end-point span {
    font-weight: 500;
    color: #495057;
    background-color: rgba(52, 152, 219, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
}

.measurement-path {
    position: absolute;
    left: 120px;
    right: 120px;
    top: 50%;
    height: 6px;
    background-color: #3498db;
    transform: translateY(-50%);
    display: none;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.measurement-indicator {
    position: absolute;
    right: -5px;
    top: -5px;
    width: 16px;
    height: 16px;
    background-color: #e74c3c;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
    animation: pulse 1.5s infinite ease-in-out;
}

#distanceTestResults {
    max-width: 500px;
    margin: 20px auto;
}

#resetDistanceTest {
    display: block;
    margin: 20px auto;
}

.test-results .result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
}

.result-label {
    font-weight: 500;
    color: #495057;
}

.result-value {
    font-weight: 600;
}

.result-value.success {
    color: #28a745;
}

.result-value.warning {
    color: #ffc107;
}

.result-value.info {
    color: #17a2b8;
}

/* Curve Test */
.curve-test-area {
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.chart-container {
    height: 350px;
    margin-bottom: 25px;
    background-color: #fff;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.curve-test-controls {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.test-progress {
    flex-grow: 1;
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    flex-grow: 1;
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 10px;
}

.progress-fill {
    height: 100%;
    background-color: #3498db;
    width: 0%;
    transition: width 0.15s ease;
}

.progress-text {
    font-size: 14px;
    font-weight: 600;
    width: 40px;
    text-align: right;
    color: #495057;
}

.curve-test-instructions {
    margin-bottom: 25px;
    padding: 15px 15px 15px 20px;
    background-color: #e9ecef;
    border-radius: 6px;
    color: #495057;
    font-size: 15px;
    line-height: 1.5;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.curve-test-instructions::before {
    content: '\f05a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: -15px;
    bottom: -15px;
    font-size: 80px;
    color: rgba(52, 152, 219, 0.1);
    transform: rotate(-15deg);
}

.curve-test-results {
    background-color: #fff;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

/* System Check */
.system-check-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.os-selector {
    display: flex;
    background-color: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}

.os-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    flex: 1;
    text-align: center;
    max-width: 150px;
}

.os-tab:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.os-tab.active {
    color: #3498db;
    background-color: #f8f9fa;
    border-bottom: 3px solid #3498db;
    font-weight: 600;
}

.os-content {
    display: none;
    padding: 25px;
}

.os-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.setting-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.setting-header {
    padding: 15px 20px;
    background-color: #f1f3f5;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-header h5 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.setting-status {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #6c757d;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 5px 10px;
    border-radius: 4px;
}

.setting-status i {
    margin-right: 8px;
}

.setting-content {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.setting-image {
    flex: 0 0 300px;
    max-width: 100%;
}

.setting-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.setting-instructions {
    flex: 1;
    min-width: 300px;
}

.setting-instructions h6 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
}

.setting-instructions ol, .setting-instructions ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.setting-instructions li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.setting-instructions code {
    background-color: #f1f3f5;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 14px;
    color: #e83e8c;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.setting-instructions pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.warning {
    color: #856404;
    background-color: #fff3cd;
    padding: 12px 15px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #ffeeba;
    font-size: 14px;
}

/* Tool Tips */
.tool-tips {
    margin-bottom: 40px;
}

.result-interpretation {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.interpretation-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.interpretation-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.interpretation-item h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.interpretation-item p {
    margin: 0;
    color: #6c757d;
    line-height: 1.5;
}

/* Common Issues */
.common-issues {
    margin-bottom: 40px;
}

.accordion {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.accordion-item {
    border-bottom: 1px solid #e9ecef;
}

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

.accordion-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
    position: relative;
    transition: all 0.2s ease;
}

.accordion-header:hover {
    background-color: #e9ecef;
}

.accordion-header::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    transition: transform 0.2s ease;
}

.accordion-item.active .accordion-header::after {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: #fff;
}

.accordion-item.active .accordion-content {
    padding: 20px;
    max-height: 500px;
}

/* Related Content */
.related-content {
    margin-bottom: 40px;
}

.related-articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.related-article {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e9ecef;
}

.related-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.related-article a {
    text-decoration: none;
    color: inherit;
}

.related-article img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #e9ecef;
}

.related-article h4 {
    padding: 15px 15px 10px;
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.related-article p {
    padding: 0 15px 15px;
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .test-tabs {
        flex-wrap: wrap;
    }
    
    .test-tab {
        flex: 1 0 50%;
    }
    
    .test-instructions {
        flex-direction: column;
        gap: 15px;
    }
    
    .instruction-step {
        max-width: 100%;
    }
    
    .result-interpretation {
        grid-template-columns: 1fr;
    }
    
    .related-articles {
        grid-template-columns: 1fr;
    }
    
    .setting-content {
        flex-direction: column;
    }
    
    .setting-image {
        flex: 0 0 100%;
    }
}

/* Animation for button clicks */
.btn:active {
    transform: scale(0.98);
}
