body {
    font-family: 'Segoe UI', system-ui;
    margin: 0;
    padding: 2rem;
    background: #f0f2f5;
}

body {
    background: #1a1a1a;
    color: #e0e0e0;
}

.upload-section {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-section input[type="file"] {
    margin-bottom: 10px;
}

.upload-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
}

.upload-btn:hover {
    background-color: #45a049;
}

.upload-btn:active {
    background-color: #388e3c;
}

.help-text {
    margin-top: 20px;
    font-size: 16px;
}


.container {
    max-width: 1400px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

h1 {
    color: #fff;
    grid-column: 1 / -1;
    text-align: center;
    font-weight: 300;
    letter-spacing: 1px;
}

.block-palette {
    flex-direction: column;
    padding: 1rem;
    background: #2d2d2d;
    border-radius: 12px;
}

.workspace {
    min-height: 60vh;
    background: #252525;
    border-color: #404040;
    position: relative;
}

.block {
    background: #363636;
    border: 1px solid #404040;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.straight-block { background: linear-gradient(145deg, #2196F3, #1976D2); }
.strafe-block { background: linear-gradient(145deg, #9C27B0, #6A1B9A); }
.turn-block { background: linear-gradient(145deg, #FF9800, #F57C00); }
.start-block { background: linear-gradient(145deg, #4CAF50, #388E3C); }

.delete-btn {
    color: #ff6666;
    font-weight: bold;
    left: 7px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.delete-btn:hover {
    opacity: 1;
}

.convert-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-weight: 600;
}

.modal-content {
    background: #2d2d2d;
    color: #e0e0e0;
    width: 70%;
    max-width: 600px;
    padding: 1.5rem;
}

#convertedCode {
    background: #1a1a1a;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    white-space: pre-wrap;
}

.close {
    color: #fff;
    float: right;
    font-size: 1.8rem;
}

.block {
    position: relative;
    padding: 1rem 1.5rem 1rem 2.5rem;
}

.delete-btn {
    position: absolute;
    margin-right: 50%;
    top: 50%;
    transform: translateY(-50%);
    background: #ff4444;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, left 0.2s;
    font-size: 0.9rem;
}

.block:hover .delete-btn {
    opacity: 1;
    left: -60px;
}

.copy-btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 1rem;
}

.copy-btn:hover {
    background: #1976D2;
}

.convert-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
}

.straight-block { background: #2196F3; }
.strafe-block { background: #9C27B0; }
.turn-block { background: #FF9800; }

.block {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    cursor: move;
    user-select: none;
    transition: transform 0.2s;
}

.start-block {
    background: #4CAF50;
    color: white;
}

.straight-block {
    background: #2196F3;
    color: white;
}

.block-palette {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.block input {
    width: 60px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-left: 8px;
}

.convert-btn {
    background: #ff5722;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.convert-btn:hover {
    background: #f4511e;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
}

.modal-content {
    background: #2d2d2d;
    position: relative;
    transform: translateY(-50%);
    margin: 0 auto;
    width: 70%;
    max-width: 600px;
}

.modal-content {
    background: #313131;
    margin: 15% auto;
    padding: 20px;
    width: 60%;
    border-radius: 8px;
}
