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

body {
    background: #2a2a2a;
    font-family: Arial, sans-serif;
    height: 100vh;
    overflow: hidden;
}

canvas {
    display: block;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* Üst düymələr */
.top-controls {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.top-btn {
    padding: 8px 16px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    font-weight: 500;
}
.reset-btn    { background: #ff9800; }
.download-btn { background: #2196f3; }
.settings-btn { background: #9c27b0; }

/* Plus / Delete */
.plus-btn {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60px; height: 60px;
    background: rgba(255,255,255,0.2);
    border: 3px solid rgba(255,255,255,0.4);
    color: rgba(255,255,255,0.8);
    font-size: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.plus-btn.hidden { display: none !important; }

.delete-btn {
    position: fixed;
    top: 70px; left: 15px;
    width: 36px; height: 36px;
    background: rgba(255,59,48,0.8);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
}
.delete-btn.show { display: flex; }

/* Alt geyim seçici */
.outfit-selector {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 12px;
    background: rgba(0,0,0,0.5);
    padding: 10px 15px;
    border-radius: 12px;
    backdrop-filter: blur(6px);
}

.outfit-block {
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    flex-direction: column;
}
.outfit-block:hover {
    border-color: rgba(255,255,255,0.6);
    transform: scale(1.05);
}
.outfit-block img { max-width: 90%; max-height: 90%; object-fit: contain; }

/* Geyim düzənlə paneli */
.outfit-adjuster {
    position: fixed;
    bottom: 120px;
    right: 20px;
    z-index: 10;
    background: rgba(0,0,0,0.6);
    border-radius: 12px;
    padding: 10px;
    backdrop-filter: blur(6px);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.outfit-adjuster.show { display: flex; }

.adj-btn {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.adj-btn:hover { background: rgba(255,255,255,0.3); }

.adj-row { display: flex; gap: 4px; }

.adj-toggle {
    position: fixed;
    bottom: 120px;
    right: 20px;
    z-index: 10;
    width: 50px; height: 50px;
    background: rgba(30,30,30,0.85);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.adj-toggle.show { display: flex; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
}
.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: linear-gradient(135deg, #404040, #2d2d2d);
    border: 2px solid #1a1a1a;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}
.modal-content h2 { color: rgba(255,255,255,0.9); margin-bottom: 20px; }
.modal-buttons { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.modal-btn {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    font-weight: 500;
    text-decoration: none;
}
.upload-option   { background: #4a90e2; }
.generate-option { background: #50c878; }
.close-btn {
    position: absolute;
    top: 10px; right: 15px;
    background: none; border: none;
    color: rgba(255,255,255,0.6);
    font-size: 24px;
    cursor: pointer;
}

/* Gizli input */
input[type="file"] { display: none; }

/* Bunlar artıq lazım deyil, canvas-da çəkilir */
.selected-outfit { display: none; }
.game-area { display: contents; }
.container { display: contents; }
.canvas-wrapper { display: contents; }