/* Aleska GUI System - Modern Panel Styling */

.aleska-gui-panel {
    background: linear-gradient(135deg, #2a2a2e 0%, #1f1f23 100%);
    border: 1px solid #3e3e42;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5),
                0 2px 4px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    color: #e0e0e0;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: box-shadow 0.2s ease;
    min-width: 180px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.aleska-gui-panel:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6),
                0 3px 6px rgba(0, 0, 0, 0.4);
}

/* Title Bar */
.aleska-gui-titlebar {
    background: linear-gradient(180deg, #3a3a3e 0%, #2e2e32 100%);
    border-bottom: 1px solid #4a4a4e;
    padding: 6px 8px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 5px 5px 0 0;
    gap: 8px;
    flex-shrink: 0;
}

.aleska-gui-titlebar:active {
    background: linear-gradient(180deg, #454549 0%, #393940 100%);
}

.aleska-gui-title-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aleska-gui-title-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Title Bar Buttons */
.aleska-gui-close-btn,
.aleska-gui-minimize-btn {
    background: none;
    border: none;
    color: #b0b0b0;
    font-size: 16px;
    font-weight: 300;
    cursor: pointer;
    padding: 0;
    width: 18px;
    height: 18px;
    line-height: 16px;
    text-align: center;
    border-radius: 3px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aleska-gui-close-btn:hover {
    background: #d32f2f;
    color: white;
}

.aleska-gui-minimize-btn:hover {
    background: #555;
    color: white;
}

/* Content Area */
.aleska-gui-content {
    padding: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    flex: 1;
    min-height: 0;
}

/* Custom Scrollbar */
.aleska-gui-content::-webkit-scrollbar {
    width: 8px;
}

.aleska-gui-content::-webkit-scrollbar-track {
    background: #1a1a1e;
    border-radius: 4px;
}

.aleska-gui-content::-webkit-scrollbar-thumb {
    background: #4a4a4e;
    border-radius: 4px;
}

.aleska-gui-content::-webkit-scrollbar-thumb:hover {
    background: #5a5a5e;
}

/* Controls */
.aleska-gui-control {
    margin-bottom: 6px;
}

.aleska-gui-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.aleska-gui-label {
    flex: 1;
    color: #d0d0d0;
    font-size: 11px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aleska-gui-label-only {
    color: #a0a0a0;
    font-size: 10px;
    font-style: italic;
    padding: 2px 0;
}

/* Button */
.aleska-gui-button {
    width: 100%;
    background: linear-gradient(180deg, #4a4a4e 0%, #3a3a3e 100%);
    border: 1px solid #5a5a5e;
    color: #e0e0e0;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.aleska-gui-button:hover {
    background: linear-gradient(180deg, #5a5a5e 0%, #4a4a4e 100%);
    border-color: #6a6a6e;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.aleska-gui-button:active {
    background: linear-gradient(180deg, #3a3a3e 0%, #2a2a2e 100%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Input Fields */
.aleska-gui-input,
.aleska-gui-select {
    flex: 0 0 70px;
    background: #1a1a1e;
    border: 1px solid #3a3a3e;
    color: #e0e0e0;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 11px;
    transition: all 0.15s ease;
}

.aleska-gui-input:focus,
.aleska-gui-select:focus {
    outline: none;
    border-color: #5a8fd4;
    box-shadow: 0 0 0 2px rgba(90, 143, 212, 0.2);
}

.aleska-gui-input:hover,
.aleska-gui-select:hover {
    border-color: #4a4a4e;
}

/* Checkbox */
.aleska-gui-checkbox {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #5a8fd4;
}

/* Color Picker */
.aleska-gui-color {
    flex: 0 0 50px;
    height: 28px;
    border: 1px solid #3a3a3e;
    border-radius: 4px;
    cursor: pointer;
    background: none;
}

.aleska-gui-color:hover {
    border-color: #5a5a5e;
}

/* Slider */
.aleska-gui-slider-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 24px;
}

.aleska-gui-slider {
    flex: 1;
    height: 18px;
    border-radius: 2px;
    background: transparent;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    margin: 0;
    padding: 0;
}

.aleska-gui-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6a9fd8 0%, #5a8fd4 100%);
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    margin-top: -5px;
}

.aleska-gui-slider::-webkit-slider-thumb:hover {
    background: linear-gradient(135deg, #7aafe8 0%, #6a9fd4 100%);
    transform: scale(1.1);
}

.aleska-gui-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6a9fd8 0%, #5a8fd4 100%);
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    margin-top: -5px;
}

.aleska-gui-slider::-moz-range-thumb:hover {
    background: linear-gradient(135deg, #7aafe8 0%, #6a9fd4 100%);
    transform: scale(1.1);
}

.aleska-gui-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #1a1a1e 0%, #3a3a3e 100%);
    border-radius: 2px;
}

.aleska-gui-slider::-moz-range-track {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #1a1a1e 0%, #3a3a3e 100%);
    border-radius: 2px;
}

.aleska-gui-value {
    flex: 0 0 auto;
    color: #a0a0a0;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    min-width: 40px;
    text-align: right;
}

/* Separator */
.aleska-gui-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #3a3a3e 50%, transparent 100%);
    margin: 8px 0;
}

/* Folder */
.aleska-gui-folder {
    margin-bottom: 6px;
}

.aleska-gui-folder-header {
    background: linear-gradient(180deg, #35353a 0%, #2a2a2e 100%);
    border: 1px solid #3a3a3e;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 500;
    font-size: 11px;
    user-select: none;
    transition: all 0.15s ease;
    position: relative;
    padding-left: 22px;
}

.aleska-gui-folder-header::before {
    content: '▼';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
    transition: transform 0.15s ease;
    color: #a0a0a0;
}

.aleska-gui-folder-header.closed::before {
    transform: translateY(-50%) rotate(-90deg);
}

.aleska-gui-folder-header:hover {
    background: linear-gradient(180deg, #45454a 0%, #3a3a3e 100%);
    border-color: #4a4a4e;
}

.aleska-gui-folder-content {
    padding: 6px;
    padding-left: 12px;
    border-left: 2px solid #3a3a3e;
    margin-left: 8px;
    margin-top: 4px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aleska-gui-panel {
    animation: fadeIn 0.2s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .aleska-gui-panel {
        max-width: calc(100vw - 20px);
    }
}

/* Focus Styles for Accessibility */
.aleska-gui-button:focus,
.aleska-gui-input:focus,
.aleska-gui-select:focus,
.aleska-gui-checkbox:focus,
.aleska-gui-color:focus,
.aleska-gui-slider:focus {
    outline: 2px solid #5a8fd4;
    outline-offset: 2px;
}

/* Disabled State */
.aleska-gui-button:disabled,
.aleska-gui-input:disabled,
.aleska-gui-select:disabled,
.aleska-gui-checkbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Resize Handles */
.aleska-gui-resize-handle {
    position: absolute;
    z-index: 10;
}

/* Corner handles */
.aleska-gui-resize-nw {
    top: -4px;
    left: -4px;
    width: 12px;
    height: 12px;
    cursor: nw-resize;
}

.aleska-gui-resize-ne {
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    cursor: ne-resize;
}

.aleska-gui-resize-sw {
    bottom: -4px;
    left: -4px;
    width: 12px;
    height: 12px;
    cursor: sw-resize;
}

.aleska-gui-resize-se {
    bottom: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    cursor: se-resize;
}

/* Side handles - made slightly visible */
.aleska-gui-resize-n {
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 6px;
    cursor: n-resize;
    background: rgba(90, 143, 212, 0.15);
    border-radius: 0 0 3px 3px;
}

.aleska-gui-resize-s {
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 6px;
    cursor: s-resize;
    background: rgba(90, 143, 212, 0.15);
    border-radius: 3px 3px 0 0;
}

.aleska-gui-resize-w {
    left: -3px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 40px;
    cursor: w-resize;
    background: rgba(90, 143, 212, 0.15);
    border-radius: 0 3px 3px 0;
}

.aleska-gui-resize-e {
    right: -3px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 40px;
    cursor: e-resize;
    background: rgba(90, 143, 212, 0.15);
    border-radius: 3px 0 0 3px;
}

/* Brighten side handles on hover */
.aleska-gui-resize-n:hover,
.aleska-gui-resize-s:hover,
.aleska-gui-resize-w:hover,
.aleska-gui-resize-e:hover {
    background: rgba(90, 143, 212, 0.4);
}

/* Visual indicator on hover for corners */
.aleska-gui-resize-handle::after {
    content: '';
    position: absolute;
    background: rgba(90, 143, 212, 0.4);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.aleska-gui-resize-handle:hover::after {
    opacity: 1;
}

/* Corner indicators */
.aleska-gui-resize-nw::after,
.aleska-gui-resize-ne::after,
.aleska-gui-resize-sw::after,
.aleska-gui-resize-se::after {
    width: 8px;
    height: 8px;
    top: 2px;
    left: 2px;
    border-radius: 50%;
}

/* Don't show ::after on side handles since they have background */
.aleska-gui-resize-n::after,
.aleska-gui-resize-s::after,
.aleska-gui-resize-w::after,
.aleska-gui-resize-e::after {
    display: none;
}

