* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 스크롤바 숨기기 */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.container {
    display: flex;
    flex-direction: row;
    height: 100vh;
    gap: 0;
}

.toolbar {
    background: white;
    padding: 20px;
    width: 280px;
    flex-shrink: 0;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.toolbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.toolbar h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.gate-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.gate-btn {
    background: #333;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.gate-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.gate-btn:active {
    transform: translateY(0);
}

.gate-btn.selected {
    background: #666;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    border: 2px solid #000;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-top: 10px;
    border-top: 2px solid #eee;
}

.control-btn {
    background: #444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

.control-btn.active {
    background: #000;
}

.info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #333;
}

.info h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.info ul {
    list-style: none;
    color: #555;
}

.info li {
    padding: 5px 0;
    font-size: 0.9em;
}

.info strong {
    color: #000;
}

.canvas-container {
    background: white;
    flex: 1;
    padding: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#canvas {
    display: block;
    background: #fafafa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: crosshair;
}

/* 반응형 디자인 */
@media (max-width: 767px) {
    .container {
        flex-direction: column;
    }

    .toolbar {
        width: 100%;
        max-height: 40vh;
    }

    .gate-buttons {
        justify-content: center;
    }

    .gate-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
}
