* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #e0e0e0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.logo-container {
    width: 1400px;
    height: 900px;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    border: 3px solid #0f3460;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.logo-header {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    color: #64ffda;
    padding: 12px 20px;
    border-bottom: 2px solid #0f3460;
}

.logo-branding {
    font-weight: bold;
    font-size: 18px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-title {
    text-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
}

.logo-info {
    font-size: 12px;
    margin-top: 4px;
    color: #a0a0a0;
}

.logo-menu-bar {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    padding: 8px 12px;
    display: flex;
    gap: 6px;
    border-bottom: 2px solid #0f3460;
    flex-wrap: wrap;
}

.menu-btn {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    color: #64ffda;
    border: 1px solid #0f3460;
    padding: 6px 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-btn:hover {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    border-color: #64ffda;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
    transform: translateY(-1px);
}

.menu-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.run-btn {
    background: linear-gradient(135deg, #00c853 0%, #00a844 100%);
    color: white;
    border-color: #00c853;
}

.run-btn:hover {
    background: linear-gradient(135deg, #00a844 0%, #00c853 100%);
    box-shadow: 0 0 15px rgba(0, 200, 83, 0.5);
}

.stop-btn {
    background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
    color: white;
    border-color: #ff5252;
}

.stop-btn:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #ff5252 100%);
    box-shadow: 0 0 15px rgba(255, 82, 82, 0.5);
}

.logo-main {
    flex: 1;
    display: flex;
    overflow: hidden;
    gap: 4px;
    padding: 4px;
}

.editor-panel,
.canvas-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 2px solid #0f3460;
    border-radius: 8px;
    background: #0a0e27;
    overflow: hidden;
}

.panel-header {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    color: #64ffda;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: bold;
    border-bottom: 2px solid #0f3460;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.line-count {
    font-size: 11px;
    color: #a0a0a0;
    font-weight: normal;
}

.turtle-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.turtle-info {
    font-size: 11px;
    color: #a0a0a0;
    font-weight: normal;
}

.theme-btn {
    background: #0f3460;
    color: #64ffda;
    border: 1px solid #0f3460;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-btn:hover {
    background: #16213e;
    border-color: #64ffda;
}

.speed-btn {
    background: #0f3460;
    color: #64ffda;
    border: 1px solid #0f3460;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.speed-btn:hover {
    background: #16213e;
    border-color: #64ffda;
}

.logo-editor {
    flex: 1;
    background: #0a0e27;
    color: #64ffda;
    border: none;
    padding: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    outline: none;
    overflow-y: auto;
    tab-size: 4;
}

.logo-editor::placeholder {
    color: #4a4a6a;
}

.logo-editor::-webkit-scrollbar {
    width: 12px;
}

.logo-editor::-webkit-scrollbar-track {
    background: #0a0e27;
}

.logo-editor::-webkit-scrollbar-thumb {
    background: #16213e;
    border: 2px solid #0a0e27;
    border-radius: 6px;
}

.logo-editor::-webkit-scrollbar-thumb:hover {
    background: #0f3460;
}

.canvas-container {
    flex: 1;
    background: #0a0e27;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.drawing-canvas {
    background: #ffffff;
    border: 2px solid #0f3460;
    display: block;
    max-width: 100%;
    max-height: 100%;
    position: absolute;
    z-index: 1;
}

.turtle-canvas {
    background: transparent;
    display: block;
    max-width: 100%;
    max-height: 100%;
    position: absolute;
    z-index: 2;
    pointer-events: none;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 39, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.3s;
}

.canvas-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-message {
    color: #64ffda;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
    font-weight: bold;
}

.logo-status-bar {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    color: #64ffda;
    padding: 6px 12px;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    border-top: 2px solid #0f3460;
}

#status-line {
    font-weight: bold;
}

#execution-info {
    color: #a0a0a0;
}

.error-message {
    color: #ff5252;
}

.success-message {
    color: #00c853;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    border: 3px solid #0f3460;
    border-radius: 12px;
    width: 800px;
    max-width: 90%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.modal-header {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    color: #64ffda;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #0f3460;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-close {
    background: none;
    border: none;
    color: #64ffda;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 4px;
}

.modal-close:hover {
    color: #ffffff;
    background: rgba(100, 255, 218, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-body::-webkit-scrollbar {
    width: 12px;
}

.modal-body::-webkit-scrollbar-track {
    background: #0a0e27;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #16213e;
    border: 2px solid #0a0e27;
    border-radius: 6px;
}

.samples-search-container {
    margin-bottom: 16px;
}

.samples-search {
    width: 100%;
    background: #0a0e27;
    color: #64ffda;
    border: 2px solid #0f3460;
    border-radius: 6px;
    padding: 12px 16px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s;
}

.samples-search:focus {
    border-color: #64ffda;
    background: #16213e;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

.samples-search::placeholder {
    color: #4a4a6a;
}

.samples-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sample-item {
    background: #0a0e27;
    border: 2px solid #0f3460;
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.sample-item:hover {
    background: #16213e;
    border-color: #64ffda;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.2);
}

.sample-title {
    font-weight: bold;
    font-size: 15px;
    color: #64ffda;
    margin-bottom: 6px;
}

.sample-description {
    font-size: 12px;
    color: #a0a0a0;
    margin-bottom: 8px;
}

.sample-preview {
    font-size: 11px;
    color: #64ffda;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    max-height: 80px;
    overflow: hidden;
    background: #0a0e27;
    padding: 8px;
    border: 1px solid #0f3460;
    border-radius: 4px;
}

/* Dialog Modal Styles */
.dialog-content {
    width: 500px;
    max-width: 90%;
}

.dialog-message {
    color: #64ffda;
    font-size: 14px;
    margin-bottom: 16px;
    white-space: pre-wrap;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.dialog-input-container {
    margin-bottom: 16px;
}

.dialog-input {
    width: 100%;
    background: #0a0e27;
    color: #64ffda;
    border: 2px solid #0f3460;
    border-radius: 6px;
    padding: 10px 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.dialog-input:focus {
    border-color: #64ffda;
    background: #16213e;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

.dialog-list {
    max-height: 200px;
    overflow-y: auto;
    background: #0a0e27;
    border: 2px solid #0f3460;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: #64ffda;
    white-space: pre-wrap;
}

.dialog-list::-webkit-scrollbar {
    width: 12px;
}

.dialog-list::-webkit-scrollbar-track {
    background: #0a0e27;
}

.dialog-list::-webkit-scrollbar-thumb {
    background: #16213e;
    border: 2px solid #0a0e27;
    border-radius: 6px;
}

.dialog-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 20px;
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    border-top: 2px solid #0f3460;
    border-radius: 0 0 12px 12px;
}

.dialog-btn {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    color: #64ffda;
    border: 1px solid #0f3460;
    border-radius: 6px;
    padding: 8px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dialog-btn:hover {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    border-color: #64ffda;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
    transform: translateY(-1px);
}

.dialog-btn:active {
    transform: translateY(0);
}

/* Help Modal Styles */
.help-content {
    width: 900px;
    max-width: 95%;
    max-height: 85%;
}

.help-content-body {
    overflow-y: auto;
    max-height: calc(85vh - 120px);
}

.help-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
}

.help-table thead {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    color: #64ffda;
    position: sticky;
    top: 0;
    z-index: 10;
}

.help-table th {
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #0f3460;
}

.help-table tbody tr {
    border-bottom: 1px solid #0f3460;
    transition: background-color 0.2s;
}

.help-table tbody tr:hover {
    background-color: #16213e;
}

.help-table td {
    padding: 10px 12px;
    color: #64ffda;
    vertical-align: top;
}

.help-command {
    width: 35%;
    font-weight: 600;
}

.help-command code {
    background-color: #0a0e27;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #0f3460;
    color: #64ffda;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    display: inline-block;
}

.help-description {
    width: 65%;
    color: #a0a0a0;
    line-height: 1.6;
}
