body {
    background-color: #2c2c2c;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
.tree-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.tree-header {
    text-align: left;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #4a4a4a;
}
.tree-header h1 {
    font-size: 28px;
    color: #ffffff;
    margin-bottom: 10px;
}
.tree-header p {
    color: #a0a0a0;
    font-size: 14px;
    margin: 5px 0;
}
.control-panel {
    background-color: #3d3d3d;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
}
.tool-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: #4a4a4a;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
}
.tool-status #toolIcon {
    font-size: 18px;
    color: #f5f5dc;
}
.drawing-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}
.drawing-controls button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #8b7355;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}
.drawing-controls button:hover {
    background-color: #6b5344;
}
.drawing-controls button.clear {
    background-color: #c0392b;
}
.drawing-controls button.clear:hover {
    background-color: #a93226;
}
.drawing-controls button.active {
    background-color: #d4a574;
    color: #2c2c2c;
}
.drawing-controls button.eraser {
    background-color: #5d6d7e;
}
.drawing-controls button.eraser:hover {
    background-color: #4a5a6a;
}
.drawing-controls button.eraser.active {
    background-color: #d4a574;
    color: #2c2c2c;
}
.tree-visualization {
    background-color: #1a4a1a;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 30px;
    aspect-ratio: 254 / 158.8;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 0 100px rgba(0,0,0,0.3),
        0 0 0 15px #5d4e37,
        0 0 0 18px #8b7355,
        0 10px 30px rgba(0,0,0,0.5);
}
.blackboard-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.15) 100%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.3;
    z-index: 1;
}
.drawing-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Crect x='10' y='2' width='4' height='18' fill='%23ffffff' rx='1'/%3E%3C/svg%3E") 12 2, crosshair;
    z-index: 10;
}
.footer {
    text-align: center;
    color: #a0a0a0;
    font-size: 14px;
    padding: 20px;
    border-top: 1px solid #4a4a4a;
    margin-top: 30px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d4a574;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
}
.back-link:hover {
    color: #c49464;
}
.color-picker {
    display: flex;
    gap: 8px;
    align-items: center;
}
.color-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #4a4a4a;
    cursor: pointer;
    transition: all 0.2s;
}
.color-btn:hover {
    transform: scale(1.1);
}
.color-btn.active {
    border-color: #ffffff;
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
}
.color-white { background-color: #ffffff; }
.color-yellow { background-color: #ffff99; }
.color-pink { background-color: #ffb6c1; }
.color-blue { background-color: #87ceeb; }
.color-green { background-color: #90ee90; }
.category-nav {
    background-color: #3d3d3d;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.category-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.breadcrumb-link {
    color: #d4a574;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
}
.breadcrumb-link:hover {
    color: #c49464;
    text-decoration: underline;
}
.breadcrumb-separator {
    color: #666;
    font-size: 12px;
}
.breadcrumb-current {
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}
.category-selector {
    display: flex;
    gap: 8px;
    align-items: center;
}
.category-select {
    padding: 8px 12px;
    background-color: #4a4a4a;
    color: #ffffff;
    border: 1px solid #5a5a5a;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    min-width: 120px;
}
.category-select:focus {
    outline: none;
    border-color: #d4a574;
}
.category-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.question-panel {
    background-color: #3d3d3d;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #d4a574;
}
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.question-title {
    font-size: 18px;
    color: #d4a574;
    font-weight: bold;
}
.question-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}
.question-nav button {
    padding: 8px 16px;
    background-color: #5d6d7e;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}
.question-nav button:hover:not(:disabled) {
    background-color: #4a5a6a;
}
.question-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.question-counter {
    color: #a0a0a0;
    font-size: 14px;
    min-width: 60px;
    text-align: center;
}
.question-content {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.6;
    padding: 15px;
    background-color: #2c2c2c;
    border-radius: 8px;
}
.question-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.question-text {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.6;
}
.question-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    object-fit: contain;
    background-color: #1a1a1a;
    padding: 10px;
    box-sizing: border-box;
}
.question-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 10px;
}
.question-image-container.single {
    flex-wrap: nowrap;
}
.question-image-container.multiple {
    flex-wrap: wrap;
}
.question-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}
.question-image-container.multiple .question-image {
    max-width: calc(50% - 10px);
    max-height: 250px;
}
.question-image {
    cursor: pointer;
    transition: transform 0.2s;
}
.question-image:hover {
    transform: scale(1.02);
}
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}
.image-modal.active {
    display: flex;
}
.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}
.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}
.image-modal-close:hover {
    color: #d4a574;
}
@media (max-width: 768px) {
    .control-panel {
        flex-direction: column;
        align-items: stretch;
    }
    .drawing-controls {
        justify-content: center;
    }
    .category-nav {
        flex-direction: column;
        align-items: stretch;
    }
    .category-selector {
        flex-wrap: wrap;
    }
    .category-select {
        flex: 1;
        min-width: 100px;
    }
}
