* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #3498db;
    --secondary: #2c3e50;
    --accent: #e74c3c;
    --success: #2ecc71;
    --warning: #f39c12;
    --light: #ecf0f1;
    --dark: #1a252f;
}

body {
    background: linear-gradient(135deg, #fff, #FFf, #fff);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #333;
    min-height: 100vh;
    padding: 20px 20px;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/*index.html*/

header {
    text-align: center;
    padding: 20px;
    background: #165DFF;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    color: white;
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.exam-categories {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
}

.category {
    width: 45%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.category-title {
    color: var(--secondary);
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary);
}

.year-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.year-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--light);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
}

.year-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: var(--primary);
    color: white;
}

.year-btn.active {
    background: var(--primary);
    color: white;
}

.year-btn::after {
    content: attr(data-year);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 25px;
    color: white;
    margin-top: 30px;
    background: rgba(26, 37, 47, 0.8);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}


/*cp-r1-test.html*/

.control-panel {
    /*background: rgba(255, 255, 255, 0.92);*/
    background: rgba(44, 62, 80, 0.85);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px;
    padding: 15px 25px;
    margin: 0 0 20px 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.question-navigation {
    display: flex;
    gap: 10px;
    align-items: center;
}

.stats {
    display: flex;
    gap: 15px;
    font-size: 1.1rem;
}

.stat {
    background: var(--primary);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 600;
}

.exam-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
}

.question-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    height: fit-content;
    /*max-height: 80vh;*/
    overflow-y: auto;
}

.question-sidebar h2 {
    color: var(--secondary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary);
}

.question-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.question-item {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #ddd;
    font-size:120%;
}

.question-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.question-item.current {
    /* background: var(--primary);
    color: white; */
    border-color: var(--primary);
}

.question-item.answered {
    /* background: var(--success);
    color: white;
    border-color: var(--success); */
    font-size:90%;
    color:#2ecc71;
}

.question-item.marked {
    background: var(--warning);
    /*color: white;*/
    /*border-color: var(--warning);*/
}

.exam-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.question-content {
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.options {
    display: grid;
    gap: 5px;
    margin-bottom: 30px;
}

.option {
    padding: 5px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option:hover {
    border-color: var(--primary);
    background: rgba(52, 152, 219, 0.05);
}

.option.selected {
    border-color: var(--success);
    background: rgba(46, 204, 113, 0.1);
}

.option-letter {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1rem;
}

pre, .code-block {
    background: #2c3e50;
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    overflow: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.2;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1.05rem;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4);
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.5);
}

.btn-secondary {
    background: var(--secondary);
    box-shadow: 0 4px 10px rgba(44, 62, 80, 0.4);
}

.btn-secondary:hover {
    background: #1e2a36;
    box-shadow: 0 6px 15px rgba(44, 62, 80, 0.5);
}

.btn-accent {
    background: var(--accent);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
}

.btn-accent:hover {
    background: #c0392b;
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.5);
}

.analysis-section {
    margin-top: 40px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--success);
}

.analysis-section h3 {
    color: var(--secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.analysis-content {
    line-height: 1.8;
}

.analysis-content p {
    margin-bottom: 15px;
}

footer {
    text-align: center;
    padding: 25px;
    color: white;
    margin-top: 30px;
    background: rgba(26, 37, 47, 0.8);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.program-section {
    background: #2c3e50;
    border-radius: 10px;
    padding: 0 20px;
    margin: 0 20px 0;
    border-left: 4px solid var(--primary);
}

.program-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--secondary);
}

.sub-question-nav {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.sub-question-btn {
    padding: 8px 15px;
    background: var(--light);
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.sub-question-btn:hover {
    background: #e0e0e0;
}

.sub-question-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.completion-section {
    background: #2c3e50;
    border-radius: 10px;
    padding: 0 20px;
    margin: 0 20px;
    border-left: 4px solid var(--warning);
}

@media (max-width: 900px) {
    .exam-container {
        grid-template-columns: 1fr;
    }

    /*.question-sidebar {
        max-height: 300px;
    }*/

    .control-panel {
        flex-direction: column;
        gap: 15px;
    }

    .question-list {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 600px) {
    .question-list {
        grid-template-columns: repeat(5, 1fr);
    }

    .question-item {
        width: 40px;
        height: 40px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
    }
}