:root {
    --primary-color: #ff69b4;
    --primary-light: #ffb6c1;
    --primary-dark: #db7093;
    --text-color: #333;
    --bg-color: #fff5f7;
    --border-color: #ffc0cb;
    --shadow-color: rgba(255, 105, 180, 0.2);
}

.code-pdf-viewer-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
}

.code-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 20px;
    text-align: center;
}

.code-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.code-header p {
    opacity: 0.9;
}

.code-titles-container {
    padding: 10px;
}

.code-title-item {
    margin-bottom: 10px;
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.code-title-header {
    background-color: var(--primary-light);
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.code-title-header:hover {
    background-color: #ffa7b9;
}

.code-title-header h2, .code-title-header h3 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.code-title-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.code-title-content.expanded {
    max-height: 1000px;
}

.code-level-2 .code-title-header {
    background-color: #ffe4e9;
    padding-left: 25px;
}

.code-pdf-container {
    width: 100%;
    height: 600px;
    border: none;
    margin-top: 10px;
}

.code-toggle-icon {
    transition: transform 0.3s;
}

.code-title-header.active .code-toggle-icon {
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .code-pdf-container {
        height: 400px;
    }
}