@import url('https://fonts.googleapis.com/css2?family=Domine:wght@400..700&display=swap');

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

body {
    font-family: "Merriweather", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
            "wdth" 100;
    background: #1a1a1a;
    color: #c9c9c9;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

#canvas {
    display: block;
    flex: 1;
    background: #000;
    cursor: crosshair;
}

.info-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    color: #c9c9c9;
    font-family: 'Inter', monospace;
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.info-overlay a {
    color: #4a9eff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-overlay a:hover {
    color: #6bb0ff;
    text-decoration: underline;
}

.sidebar {
    width: 340px;
    min-width: 280px;
    max-width: 600px;
    flex-shrink: 0;
    background: #222222;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #333;
    position: relative;
}

.sidebar-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: ew-resize;
    background: transparent;
    z-index: 1000;
}

.sidebar-resize-handle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-resize-handle::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background: #555;
    border-radius: 1px;
}

.tabs {
    display: flex;
    background: #2a2a2a;
    border-bottom: 1px solid #333;
}

.tab {
    flex: 1;
    padding: 14px;
    text-align: center;
    background: transparent;
    border: none;
    color: #888;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tab:hover {
    color: #c9c9c9;
    background: #2e2e2e;
}

.tab.active {
    color: #ffffff;
    font-weight: 600;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ffffff;
}

.tab-content {
    display: none;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.tab-content.active {
    display: block;
}

h1 {
    font-family: "Inter", sans-serif;
        font-optical-sizing: auto;
        font-weight: 400;
        font-style: normal;
    font-size: 24px;
    margin-bottom: 6px;
    color: #ffffff;
    font-weight: 300;
    letter-spacing: -0.3px;
}

h2 {
    font-family: "Inter", sans-serif;
        font-optical-sizing: auto;
        font-weight: 400;
        font-style: normal;
    font-size: 14px;
    margin-bottom: 12px;
    margin-top: 12px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: none;
    padding-bottom: 0;
}

h3 {
    font-family: "Inter", sans-serif;
        font-optical-sizing: auto;
        font-weight: 400;
        font-style: normal;
    font-size: 15px;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #dedede;
    font-weight: 600;
}

a {
    color: #ffffff;
    text-decoration: underline;
    cursor: pointer;
}

a:hover {
    color: #e0e0e0;
}

.subtitle {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
    font-weight: 400;
}

/* About tab styles */
.about-content {
    line-height: 1.8;
    color: #b0b0b0;
}

.about-content h1,
.about-content h2,
.about-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
}

.about-content h1 {
    font-size: 22px;
    color: #ffffff;
    border-bottom: 1px solid #333;
    padding-bottom: 12px;
    font-weight: 300;
}

.about-content h2 {
    font-size: 17px;
    color: #e0e0e0;
    text-transform: none;
    letter-spacing: 0;
    border: none;
    padding-bottom: 0;
    font-weight: 500;
}

.about-content h3 {
    font-size: 14px;
    color: #c0c0c0;
    font-weight: 600;
}

.about-content p {
    margin-bottom: 14px;
    color: #b0b0b0;
}

.about-content code {
    background: #2a2a2a;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #ffffff;
    border: 1px solid #333;
}

.about-content pre {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 14px;
    overflow-x: auto;
    margin: 14px 0;
}

.about-content pre code {
    background: transparent;
    padding: 0;
    color: #c9c9c9;
    border: none;
}

.about-content ul {
    margin: 12px 0 12px 24px;
    list-style: none;
}

.about-content ul li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.about-content ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #ffffff;
    font-weight: bold;
}

.about-content strong {
    color: #ffffff;
    font-weight: 600;
}

.control-group {
    font-family: "Inter", sans-serif;
        font-optical-sizing: auto;
        font-weight: 400;
        font-style: normal;
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #b0b0b0;
    font-weight: 500;
}

.param-hint {
    display: block;
    font-size: 11px;
    color: #777;
    margin-top: 4px;
    font-style: italic;
    line-height: 1.4;
}

input[type="range"] {
    width: 100%;
    height: 4px;
    background: #3a3a3a;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #e6e6e6;
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transition: all 0.15s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #e6e6e6;
    transform: scale(1.1);
}

.value-display {
    display: inline-block;
    min-width: 50px;
    text-align: right;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
}

select {
    width: 100%;
    padding: 8px 10px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    color: #c9c9c9;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

select:hover {
    border-color: #ffffff;
    background: #2e2e2e;
}

select:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

button {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: #ffffff;
    border: none;
    border-radius: 4px;
    color: #222222;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

button:hover {
    background: #e6e6e6;
}

button:active {
    transform: scale(0.98);
}

button.secondary {
    background: #2a2a2a;
    color: #c9c9c9;
    border: 1px solid #3a3a3a;
}

button.secondary:hover {
    background: #333;
    border-color: #4a4a4a;
}

.button-group {
    display: flex;
    gap: 8px;
}

.button-group button {
    flex: 1;
}

#status {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 13px;
    color: #222222;
    display: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.info {
    background: #2a2a2a;
    padding: 14px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.6;
    margin-top: 18px;
    border-left: 3px solid #ffffff;
    color: #b0b0b0;
}

.info strong {
    color: #ffffff;
}

input[type="checkbox"] {
    accent-color: #ffffff;
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: unset;
        max-width: unset;
        max-height: 50vh;
        border-left: none;
        border-top: 1px solid #333;
    }

    .canvas-wrapper {
        min-height: 50vh;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        width: 300px;
        min-width: 280px;
    }
}

.canvas-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    overflow: hidden;
}

.map-labels {
    position: absolute;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.8);
    font-family: monospace;
    font-size: 11px;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
    z-index: 10;
}

.map-label-x {
    position: absolute;
    top: 5px;
    transform: translateX(-50%);
}

.map-label-y {
    position: absolute;
    left: 5px;
    transform: translateY(-50%);
}

#grapick-container {
    min-height: 30px;
}