/* 测试页面特定样式 */

/* 主要内容区域样式 */
.test-content {
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    max-width: 1200px;
    margin: 0 auto; /* Center the container */
    width: 100%; /* Ensure the container takes up full available width */
    box-sizing: border-box;
    text-align: center; /* Ensure text inside is centered */
}

.test-content h1 {
    font-size: 3rem;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
}

/* 难度选择样式 */
.difficulty-selection {
    text-align: center;
}

.difficulty-selection h2 {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 2rem;
    text-align: center;
}

.card-slider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

.slider-button {
    background: none;
    border: none;
    font-size: 2rem;
    color: #4a90e2;
    cursor: pointer;
    padding: 0 1rem;
    transition: color 0.3s;
    z-index: 1;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.slider-button.prev {
    left: 0;
}

.slider-button.next {
    right: 0;
}

.slider-button:hover {
    color: #3a7bc8;
}

.slider-button:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.card-container {
    display: flex;
    transition: transform 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.difficulty-card {
    flex: 0 0 calc(33.333% - 20px);
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 0 10px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    text-align: center;
    box-sizing: border-box;
}

.difficulty-card h3 {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.practice-info p {
    margin: 0.5rem 0;
    color: var(--text-color);
}

.attempt-count {
    font-weight: bold;
    color: #4a90e2;
}

.accuracy-chart {
    margin: 1rem auto;
    max-width: 300px;
    height: 200px;
}

/* 按钮样式 */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    margin: 0.5rem;
}

.primary-btn {
    background-color: #4a90e2;
    color: white;
}

.primary-btn:hover {
    background-color: #3a7bc8;
}

.secondary-btn {
    background-color: #e74c3c; /* Red for destructive action */
    color: white;
    border: none;
    padding: 0.8rem 1.5rem; /* Slightly larger padding for emphasis */
    margin: 2rem auto; /* Center with more spacing */
    display: block; /* Ensure button is centered */
}

.secondary-btn:hover {
    background-color: #c0392b; /* Darker red on hover */
}

/* 页脚样式 */

/* 面包屑导航样式在breadcrumb.css中定义 */

/* 响应式设计 */
@media (max-width: 992px) {
    .card-container {
        width: 300%; /* Total width for 3 cards, each 100% on mobile */
    }

    .difficulty-card {
        flex: 0 0 100%; /* Each card takes up 100% of the viewport width on mobile */
        width: 100%; /* Ensure each card takes up the full viewport width */
        margin: 0; /* Remove margin to prevent extra space */
    }

    .card-slider {
        overflow: hidden; /* Ensure overflow is hidden on mobile */
        position: relative;
        padding: 0 40px; /* Add padding to ensure buttons don't overlap cards */
    }

    .slider-button {
        display: block; /* Ensure buttons are visible on mobile */
    }
}

@media (max-width: 768px) {
    /* Removing navbar-specific styles as they should be in navbar.css */
    
    .test-content {
        padding: 2rem 1rem;
    }

    .test-content h1 {
        font-size: 2rem;
    }

    .secondary-btn {
        padding: 0.6rem 1.2rem; /* Slightly smaller padding on mobile */
        font-size: 0.9rem; /* Smaller font size for better fit */
    }
}