/* === RESET & BASE === */
html, body {
    width: 100%;
    height: 100%;
}
body.wallforge-page {
    margin: 0;
    padding: 0;
    background: #0b1018;
    overflow: auto;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #e2e8f0;
}

/* === HEADER === */
.wallforge-header-minimal {
    height: 90px;
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    padding: 0 30px;
    flex-shrink: 0;
}
.wf-logo {
    display: flex;
    align-items: baseline;
    gap: 14px;
    font-weight: bold;
    user-select: none;
}
.wf-amigos {
    color: #f1f5f9;
    font-size: 38px;
    letter-spacing: 1px;
}
.wf-blue {
    color: #60a5fa;
}
.wf-separator {
    color: #475569;
    font-size: 26px;
}
.wf-wallforge {
    color: #94a3b8;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* === MAIN LAYOUT === */
.wallforge-main {
    width: 100%;
    height: calc(100vh - 140px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.wallforge-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* === TOP BAR === */
.wallforge-topbar {
    flex-shrink: 0;
    height: 50px;
    background: #0f172a;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid #1e293b;
}
.wallforge-topbar h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #e2e8f0;
}

/* === EDITOR === */
.wallforge-editor {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

/* === SIDEBAR === */
.wallforge-sidebar {
    flex-shrink: 0;
    width: 80px;
    background: #0f172a;
    border-right: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 16px;
    gap: 10px;
}
.wf-tool {
    width: 62px;
    height: 62px;
    border: 1px solid transparent;
    background: #1e293b;
    color: #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    font-size: 18px;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.wf-tool span {
    font-size: 10px;
    font-weight: 500;
}
.wf-tool:hover {
    background: #334155;
    border-color: #475569;
    transform: translateY(-1px);
}
.wf-tool.active {
    background: #2563eb;
    border-color: #3b82f6;
    color: #fff;
}
/* === OVERLAY GALLERY === */
.wf-overlay-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
    width: 100%;
}
.wf-overlay-thumb {
    width: 50px;
    height: 50px;
    border: 2px solid #334155;
    border-radius: 6px;
    cursor: pointer;
    object-fit: contain;
    background: #0f172a;
    transition: border-color 0.15s, transform 0.15s;
}
.wf-overlay-thumb:hover {
    border-color: #60a5fa;
    transform: scale(1.08);
}
.wf-overlay-thumb.selected {
    border-color: #3b82f6;
    box-shadow: 0 0 8px rgba(59,130,246,0.5);
}
/* === FILTER PANEL === */
.wf-filter-option {
    display: none;
}
.wf-filter-option.visible {
    display: flex;
}
/* === WORKSPACE === */
.wallforge-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}

/* === TOOLBAR === */
.wallforge-toolbar {
    min-height: 55px;
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 20px;
    gap: 8px;
    flex-shrink: 0;
}
.wf-toolbar-panel {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    align-items: center;
}
.wf-toolbar-panel.active {
    display: flex;
}

/* === TOOLBAR GROUP === */
.wf-toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
    background: #1e293b;
    padding: 6px 12px;
    border-radius: 8px;
    min-height: 38px;
}
.wf-toolbar-group label {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: fit-content;
}
.wf-toolbar-group input[type="range"] {
    width: 120px;
    accent-color: #3b82f6;
    cursor: pointer;
}
.wf-toolbar-group input[type="range"]:focus {
    outline: none;
}
.wf-toolbar-group input[type="color"] {
    width: 34px;
    height: 34px;
    border: 2px solid #334155;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    padding: 0;
}
.wf-toolbar-group input[type="color"]:hover {
    border-color: #3b82f6;
}
.wf-toolbar-group input[type="text"] {
    height: 36px;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0 12px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 13px;
    min-width: 180px;
    transition: border-color 0.15s;
}
.wf-toolbar-group input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
}
.wf-toolbar-group select {
    height: 36px;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0 10px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 13px;
    cursor: pointer;
}
.wf-toolbar-group select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* === BUTTONS === */
.wf-preset-btn {
    background: #2563eb;
    border: none;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.15s;
    white-space: nowrap;
}
.wf-preset-btn:hover {
    background: #1d4ed8;
}
.wf-preset-btn.danger {
    background: #dc2626;
}
.wf-preset-btn.danger:hover {
    background: #b91c1c;
}
.wf-preset-btn.secondary {
    background: #334155;
}
.wf-preset-btn.secondary:hover {
    background: #475569;
}

/* === VALUE DISPLAY === */
.wf-value {
    font-size: 11px;
    font-weight: 600;
    color: #60a5fa;
    min-width: 32px;
    text-align: center;
    background: #0f172a;
    padding: 2px 6px;
    border-radius: 4px;
}

/* === CANVAS AREA === */
.wallforge-canvas-area {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    background: #0b1018;
}
.wallforge-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    background: #020617;
}
#wallforge-canvas {
    display: block;
    border-radius: 4px;
    pointer-events: auto;
    image-rendering: auto;
}

/* === DELETE TEXT BTN === */
#deleteTextBtn {
    background: #dc2626;
    border: none;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.15s;
}
#deleteTextBtn:hover {
    background: #b91c1c;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}
/* === LANG SELECTOR === */
.lang-selector {
    position: relative;
    margin-left: auto;
}
.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
}
.lang-btn:hover {
    background: #334155;
}
.lang-current {
    letter-spacing: 0.5px;
}
.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    overflow: hidden;
    z-index: 100;
    min-width: 130px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.lang-dropdown.open {
    display: block;
}
.lang-option {
    display: block;
    padding: 8px 16px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s;
}
.lang-option:hover {
    background: #334155;
}
.lang-option.active {
    background: #2563eb;
    color: #fff;
}