/* Additional styles for homepage split panel layout */
body.homepage {
    background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

.homepage-container {
    background: white;
    border-radius: 20px;
    max-width: 740px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(15,22,40,0.08);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    margin: 0 auto;
}

.left-panel {
    background: linear-gradient(135deg, rgba(91,140,255,0.08) 0%, rgba(255,154,162,0.05) 100%);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.demo-header-row { display:flex; align-items:center; justify-content:space-between; width:100%; }

.branding {
    margin-bottom: 24px;
}

.homepage-title {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.1;
}

.tagline {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.demo-container {
    margin-bottom: 20px;
    position: relative;
}

.demo-label {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.demo-wrapper {
    position: relative;
}

#demo-grid {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(4, 1fr);
}

#demo-grid.rotating {
    transition: transform 600ms ease;
    transform: rotate(90deg);
}
        
#demo-grid.rotating .tile {
    transition: transform 600ms ease;
    transform: rotate(-90deg);
}

.demo-grid-container {
    width: 100%;
    max-width: 280px;
}

#demo-cursor {
    position: absolute;
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0 L0 16 L4 12 L6 20 L8 18 L4 14 L10 14 Z" fill="black"/></svg>') no-repeat center;
    background-size: contain;
    pointer-events: none;
    z-index: 10;
    display: none;
    transition: left 0.2s ease, top 0.2s ease;
}

.demo-hint {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 8px;
    font-weight: 500;
}

.demo-tile {
    aspect-ratio: 1;
    border-radius: 8px;
    background: linear-gradient(rgba(255,255,255,0.65), rgba(255,255,255,0.65)), var(--tile-color);
    box-shadow: 0 3px 10px rgba(20,30,60,0.06);
    transition: transform 160ms ease, box-shadow 160ms ease;
    position: relative;
    overflow: hidden;
}

.demo-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0));
    pointer-events: none;
}

.demo-tile.highlight {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(20,30,60,0.12);
    background: var(--tile-color);
}

.right-panel {
    padding: 24px 36px 28px 36px;
    display: flex;
    flex-direction: column;
}

.right-controls { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.section {
    margin-bottom: 24px;
}

.section-label {
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 4px;
}

.homepage-mode {
    padding: 12px 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.homepage-mode:hover {
    background: #f3f4f6;
    border-color: rgba(91,140,255,0.25);
}

.homepage-mode.selected {
    background: linear-gradient(90deg, rgba(91,140,255,0.12), rgba(255,154,162,0.06));
    border-color: rgba(91,140,255,0.22);
    color: #0b1a2a;
}

.grid-options {
    display: flex;
    gap: 8px;
}

.homepage-grid {
    flex: 1;
    padding: 12px 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.grid-num {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.grid-label {
    display: block;
    font-size: 9px;
    color: #9ca3af;
    font-weight: 600;
}

.homepage-grid:hover {
    background: #f3f4f6;
    border-color: rgba(91,140,255,0.25);
}

.homepage-grid.selected {
    background: linear-gradient(90deg, rgba(91,140,255,0.12), rgba(255,154,162,0.06));
    border-color: rgba(91,140,255,0.22);
}

.homepage-grid.selected .grid-num {
    color: #0b1a2a;
}

.play-button {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(91,140,255,0.18);
    transition: all 0.2s ease;
    margin-top: 28px;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(91,140,255,0.25);
}

.play-button:active {
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .left-panel {
        padding: 10px 32px;
    }
    
    .right-panel {
        padding: 10px 36px;
    }

    .branding {
        margin-bottom: 12px;
    }

    .demo-container {
        margin-bottom: 10px;
    }
}

@media (max-width: 640px) {
    .homepage-container {
        grid-template-columns: 1fr;
    }
    
    .left-panel {
        padding: 32px 28px;
    }
    
    .right-panel {
        padding: 32px 28px;
    }

    .homepage-title {
        font-size: 30px;
    }

    .demo-container {
        display: none;
    }
}

@media (max-width: 480px) {
    .left-panel {
        padding: 28px 24px;
    }
    
    .right-panel {
        padding: 28px 24px;
    }
    
    .homepage-title {
        font-size: 26px;
    }
    
    #demo-grid {
        gap: 5px;
    }
    
    .mode-grid {
        gap: 6px;
    }
    
    .homepage-mode {
        padding: 12px 6px;
        font-size: 11px;
    }
    
    .grid-options {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .homepage-grid {
        min-width: 60px;
        padding: 10px 6px;
    }
}
