* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
}

.app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #e94560, #0f3460);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #888;
    font-size: 0.9rem;
    margin-top: 4px;
}

.main-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Camera Section */
.camera-section {
    flex: 1;
    min-width: 0;
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #16213e;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #0f3460;
}

#video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

#canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #555;
}

.camera-icon {
    font-size: 4rem;
    margin-bottom: 10px;
}

.status-bar {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.6);
    color: #2ecc71;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.status-bar.no-track {
    color: #e74c3c;
}

.camera-controls {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primary {
    background: #0f3460;
    color: #fff;
}
.btn-primary:hover:not(:disabled) {
    background: #1a4a7a;
}

.btn-danger {
    background: #e94560;
    color: #fff;
}
.btn-danger:hover:not(:disabled) {
    background: #ff6b81;
}

.btn-success {
    background: #2ecc71;
    color: #fff;
}
.btn-success:hover:not(:disabled) {
    background: #27ae60;
}

.btn-secondary {
    background: #333;
    color: #ccc;
}
.btn-secondary:hover:not(:disabled) {
    background: #444;
}

/* Controls Panel */
.controls-section {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel {
    background: #16213e;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #0f3460;
}

.panel h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #e94560;
}

/* Dress Grid */
.dress-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.dress-card {
    aspect-ratio: 3/4;
    background: #1a1a2e;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
}

.dress-card:hover {
    border-color: #e94560;
    transform: scale(1.05);
}

.dress-card.active {
    border-color: #e94560;
    box-shadow: 0 0 12px rgba(233, 69, 96, 0.4);
}

.dress-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Sliders */
.slider-group {
    margin-bottom: 10px;
}

.slider-group label {
    display: block;
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 4px;
}

.slider-group input[type="range"] {
    width: 100%;
    accent-color: #e94560;
}

/* Tips */
.tips ul {
    list-style: none;
    font-size: 0.8rem;
    color: #888;
}

.tips li {
    padding: 3px 0;
}

.tips li::before {
    content: "\2022 ";
    color: #e94560;
}

/* Responsive */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
    .controls-section {
        width: 100%;
    }
    .dress-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
