/* yeah this is all ai css, fuck doing css by hand i'm a human being not a webdev */
body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #222;
    color: white;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar styling */
.sidebar {
    width: 280px;
    background-color: #1e1e1e;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #333;
    overflow-y: auto;
}

.sidebar-right {
    border-right: none;
    border-left: 1px solid #333;
}

/* Panel grouping styling */
.panel {
    padding: 15px;
    border-bottom: 1px solid #333;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.panel-title {
    margin: 0 0 5px 0;
    font-size: 13px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 1px;
}

.flex-fill {
    flex: 1;
}

/* Center Workspace styling */
.workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #121212;
}

#preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 20px;
}

#no-image-text {
    position: absolute;
    color: #888;
    font-size: 16px;
    pointer-events: none;
}

#preview-canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    touch-action: none;
}

.playback-controls {
    height: 50px;
    background-color: #1a1a1a;
    border-top: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Controls & Number Inputs */
.button-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #2a2a2a;
    padding: 5px 8px;
    border-radius: 4px;
    border: 1px solid #444;
}

.input-group label {
    color: #aaa;
    font-size: 12px;
    font-weight: bold;
    width: 15px;
}

.input-group input {
    width: 100%;
    background: transparent;
    border: none;
    color: white;
    outline: none;
    font-family: monospace;
}

/* Lists and Dropdowns */
select {
    width: 100%;
    background-color: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 5px;
    outline: none;
}

select:focus {
    border-color: #666;
}

/* Buttons */
.btn {
    background-color: #333;
    color: white;
    border: 1px solid #444;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.btn:hover {
    background-color: #444;
}

.btn:disabled {
    background: #555;
    cursor: not-allowed;
    border-color: #555;
}

.btn.primary {
    background-color: #007acc;
    border-color: #005999;
    font-weight: bold;
}

.btn.primary:hover {
    background-color: #008be6;
}

.btn.danger {
    background-color: #8a2e2e;
    border-color: #6b2323;
}

.btn.danger:hover {
    background-color: #a33636;
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
}

.action-btn {
    margin: 15px;
    padding: 12px;
    font-weight: bold;
    background-color: #28a745;
    border-color: #1e7e34;
}

.action-btn:hover {
    background-color: #2ebd4e;
}

.layer-controls,
.effect-controls {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #333;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 350px;
    border: 1px solid #555;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
    margin: 0 0 10px 0;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

#wizard-preview {
    background: #222;
    border: 1px dashed #555;
    align-self: center;
    max-width: 100%;
    object-fit: contain;
}

/* Top Bar Styles */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2c3e50;
    padding: 10px 20px;
    color: white;
}

.top-bar img.logo {
    width: 300px;
    height: 67px;
    object-fit: contain;
}

/* Tooltip Styles */
.help-container {
    position: relative;
    display: inline-block;
}

.help-btn {
    background-color: #34495e;
    color: white;
    border: 2px solid #ecf0f1;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.help-btn:hover {
    background-color: #7f8c8d;
}

.tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: #34495e;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 15px;
    position: absolute;
    z-index: 100;
    top: 130%;
    right: 0;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.4);
    font-size: 14px;
    line-height: 1.4;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 12px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #34495e transparent;
}

.help-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Mobile Slop */
@media (max-width: 768px) {
    .container {
        flex-direction: column !important;
        overflow: auto;
    }

    .sidebar {
        width: 100% !important;
        border-right: none;
    }

    .top-bar {
        flex-direction: column;
        gap: 15px;
    }

    .help-container {
        align-self: flex-end;
    }
}