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

body {
    background: #1a1a1a;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    height: 100vh;
}

#canvas {
    display: block;
    width: 100vw;
    height: 100vh;
    cursor: grab;
}

#canvas:active {
    cursor: grabbing;
}

/* Help Button */
#help-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#help-button:hover {
    background: rgba(74, 144, 226, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    margin: 5% auto;
    padding: 30px;
    border: none;
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    color: #ffffff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close {
    color: #ffffff;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ff6b6b;
}

.modal-content h2 {
    color: #ffffff;
    margin-bottom: 25px;
    font-size: 24px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
}

.help-section {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #4a90e2;
}

.help-section h3 {
    color: #87ceeb;
    margin-bottom: 15px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-section ul {
    list-style: none;
    padding: 0;
}

.help-section li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.help-section li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #4a90e2;
    font-size: 12px;
}

.help-section li strong {
    color: #87ceeb;
}

.help-section p {
  line-height: 1.618; /* Golden ratio */
  margin-bottom: .75rem;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .modal-content h2 {
        font-size: 20px;
    }
    
    .help-section h3 {
        font-size: 16px;
    }
    
    #help-button {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}