/* Particle Editor Styles */

.fluid-container {
    max-width: 1400px;
    width: 95%;
    margin: 0 auto;
}

.editor-layout {
    display: flex;
    gap: 2rem;
    height: calc(100vh - 150px);
    min-height: 700px;
}

/* Canvas Panel (Left) */
.canvas-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(15, 15, 18, 0.6);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.8rem;
}

.panel-header h2 {
    font-size: 1.4rem;
    color: var(--text-main);
}

.particle-count {
    font-family: monospace;
    font-size: 1rem;
    color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
}

.canvas-wrapper {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--glass-border);
}

canvas {
    /* Using absolute pixel size scaled to fit */
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: crosshair;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.canvas-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
    font-style: italic;
}

/* Controls Panel (Right) */
.controls-panel {
    width: 380px;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(15, 15, 18, 0.8);
    flex-shrink: 0;
}

.properties-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 1rem;
    margin-right: -1rem; /* push scrollbar right */
}

/* Custom Scrollbar for panel */
.properties-scroll::-webkit-scrollbar {
    width: 6px;
}
.properties-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}
.properties-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.properties-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.prop-group {
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.prop-group h3 {
    font-size: 1.1rem;
    color: var(--accent-secondary);
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.prop-row {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.prop-row:last-child {
    margin-bottom: 0;
}

.prop-row.split {
    flex-direction: row;
    gap: 1rem;
}
.prop-row.split > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.prop-row label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prop-row label span {
    color: var(--text-main);
    font-family: monospace;
    background: rgba(255,255,255,0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

/* Range Inputs */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    margin-top: -5px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    transition: transform var(--transition-fast);
}
input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Color Picker */
.color-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
.color-row input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: none;
}
.color-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
.color-row input[type="color"]::-webkit-color-swatch {
    border: 2px solid var(--glass-border);
    border-radius: 8px;
}

/* Select */
.custom-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    outline: none;
    width: 100%;
    cursor: pointer;
}
.custom-select option {
    background: #1e1e1e;
}

/* File Input */
.file-input {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.file-input::file-selector-button {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: all var(--transition-fast);
}
.file-input::file-selector-button:hover {
    background: var(--accent-primary);
}

.image-preview {
    margin-top: 0.5rem;
    height: 60px;
    background: rgba(0,0,0,0.3);
    border: 1px dashed var(--glass-border);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    overflow: hidden;
}
.image-preview img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* Export Bar */
.export-bar {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 1rem;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
    font-family: 'Outfit', sans-serif;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}
.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    border-color: white;
    transform: translateY(-2px);
}
