.generator-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    padding: 0 !important;
    overflow: hidden;
    height: 750px;
    background: var(--bg-surface);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--border-color);
}

.sidebar-controls {
    padding: 30px;
    border-right: 1px solid var(--border-color);
    background: var(--bg-surface);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 28px;
    overflow-y: auto;
    align-items: center;
}

.control-section {
    width: 100%;
    text-align: center;
}

.control-section label {
    display: block;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 12px;
    color: var(--text-muted);
}

/* Sidebar Buttons */
.btn-sidebar {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.btn-sidebar:hover {
    background: var(--bg-surface-hover);
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

.btn-sidebar.primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

/* Combined Drop Zone & Image Preview */
.small-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    background: var(--input-bg);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 240px;
    /* Increased Height as requested */
    height: 240px;
    position: relative;
    overflow: hidden;
}

.small-drop-zone:hover {
    border-color: #FF6B6B;
    background: rgba(255, 107, 107, 0.08);
}

#drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: opacity 0.3s;
}

#drop-text {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 10px;
    color: var(--text-main);
}

#img-source {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    transition: opacity 0.3s;
}

.small-drop-zone.has-image #drop-zone-content {
    opacity: 0;
}

.small-drop-zone.has-image:hover #drop-zone-content {
    opacity: 1;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    color: white;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.small-drop-zone.has-image:hover #drop-text {
    color: white;
}

/* Palette Preview Area */
.palette-viewport {
    position: relative;
    background: var(--bg-body);
    height: 100%;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
}

.palette-strips {
    display: flex;
    flex-direction: column;
    /* Use column to wrap rows easily */
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
}

.strips-row {
    display: flex;
    flex: 1;
    /* Each row takes equal vertical space */
    width: 100%;
    height: 50%;
    /* Default for 2 rows */
    transition: all 0.3s ease;
}

.strips-row.single {
    height: 100%;
}

.color-strip {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: flex 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
    overflow: hidden;
}

.color-strip:hover {
    flex: 2;
    /* Re-enabled movement for both single and double row layouts */
}

.strip-info {
    text-align: center;
    z-index: 5;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.strip-hex {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.2s;
}

.strip-hex:hover {
    transform: scale(1.1);
}

.strip-name {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.strip-actions {
    position: absolute;
    bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.color-strip:hover .strip-actions {
    opacity: 1;
    transform: translateY(0);
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1rem;
    transition: all 0.2s;
}

.action-btn:hover {
    transform: scale(1.1);
}

/* Slider Styles */
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: var(--border-color);
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FF6B6B;
    cursor: pointer;
    box-shadow: 0 4px-10px rgba(255, 107, 107, 0.3);
}

.color-strip.light-text .strip-hex,
.color-strip.light-text .strip-name {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.color-strip.light-text .action-btn {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

.color-strip.dark-text .strip-hex,
.color-strip.dark-text .strip-name {
    color: #1a202c;
}

.color-strip.dark-text .action-btn {
    color: #1a202c;
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.1);
}

.welcome-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    width: 400px;
    z-index: 20;
    pointer-events: none;
}

@media (max-width: 900px) {
    .generator-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .sidebar-controls {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .strips-row {
        height: auto;
        flex-direction: column;
    }
}