@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*{
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
    overflow: hidden;
}

canvas{
    border: 1px solid black;
}

#canvas{
    background-color: black;
    background-image: radial-gradient(rgb(43, 39, 39), black);
    position: absolute;
    left: 0px;
    top: 0px;
}

/* Control Panel Styles */
#control-panel {
    position: fixed;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 8px;
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    min-width: 180px;
    z-index: 1000;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateX(0) scale(1);
    opacity: 1;
}

#control-panel.hidden {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
    pointer-events: none;
}

#control-panel h3 {
    margin-bottom: 8px;
    text-align: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.control-group {
    margin-bottom: 6px;
}

.control-group label {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 500;
    color: #e0e0e0;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #333;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #66BB6A;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.control-group input[type="color"] {
    width: 100%;
    height: 32px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    background: #666;
    padding: 0;
    overflow: hidden;
}

.control-group input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 20px;
    overflow: hidden;
}

.control-group input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 20px;
    width: 100%;
    height: 100%;
}

.control-group input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 20px;
}

.control-group button {
    width: 48%;
    padding: 4px;
    margin: 1px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 10px;
}

.control-group button:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.control-group button:active {
    transform: translateY(0);
}

.color-picker {
    margin-top: 4px;
}
#clear-btn {
    background: linear-gradient(45deg, #f44336, #d32f2f);
}

#clear-btn:hover {
    background: linear-gradient(45deg, #e57373, #f44336);
}

/* Value display styling */
.control-group span {
    color: #4CAF50;
    font-weight: bold;
    font-size: 12px;
}

/* Show button styling */
#show-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    transform: translateX(0) scale(1);
    opacity: 1;
}

#show-btn.hidden {
    transform: translateX(100%) scale(0.8);
    opacity: 0;
    pointer-events: none;
}

#show-btn:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    background: linear-gradient(45deg, #42A5F5, #2196F3);
}

#show-btn:active {
    transform: translateY(0);
}

/* Import/Export button styling */
#export-btn {
    background: linear-gradient(45deg, #FF9800, #F57C00);
}

#export-btn:hover {
    background: linear-gradient(45deg, #FFB74D, #FF9800);
}

#import-btn {
    background: linear-gradient(45deg, #9C27B0, #7B1FA2);
}

#import-btn:hover {
    background: linear-gradient(45deg, #BA68C8, #9C27B0);
}

/* Import area styling */
.import-area {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.import-area label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 500;
    color: #e0e0e0;
}

#import-text {
    width: 100%;
    height: 80px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    margin-bottom: 8px;
}

#import-text::placeholder {
    color: #888;
}

#import-text:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.import-buttons {
    display: flex;
    gap: 4px;
}

.import-buttons button {
    flex: 1;
    padding: 6px;
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
}

#copy-import-btn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

#apply-import-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

#close-import-btn {
    background: linear-gradient(45deg, #f44336, #d32f2f);
}

.import-buttons button:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Mini Window Overlay */
.mini-window-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.mini-window-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.mini-window {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    min-width: 400px;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mini-window-overlay.hidden .mini-window {
    transform: scale(0.9);
}

.mini-window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.mini-window-header h4 {
    margin: 0;
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.close-btn {
    background: none;
    border: none;
    color: #ccc;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.mini-window-content {
    padding: 16px;
}

.mini-window-content textarea {
    width: 100%;
    height: 200px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    margin-bottom: 12px;
    box-sizing: border-box;
    outline: none;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.mini-window-content textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

.mini-window-content textarea::placeholder {
    color: #888;
}

.copy-btn, .apply-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.copy-btn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

.apply-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.copy-btn:hover, .apply-btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.import-buttons {
    display: flex;
    gap: 8px;
}