/* ================================================
   AVATAR CREATOR PAGE STYLES
   ================================================ */

.avatar-page,
.avatar-section {
    position: relative;
    z-index: 3;
}

/* ================================================
   HERO STRIP
   ================================================ */

.avatar-hero {
    background-image:
        linear-gradient(rgba(204, 17, 17, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(204, 17, 17, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    border-bottom: 4px solid var(--color-red-dark);
    padding: 40px 32px;
    text-align: center;
    position: relative;
    z-index: 3;
}

.avatar-hero-eyebrow {
    font-size: 7px;
    color: var(--color-red);
    letter-spacing: 3px;
    margin-bottom: 14px;
    animation: blink 1.2s step-end infinite;
}

.avatar-hero-title {
    font-size: clamp(18px, 3vw, 32px);
    color: var(--color-white);
    letter-spacing: 3px;
    text-shadow:
        4px 4px 0 var(--color-red),
        6px 6px 0 var(--color-red-dark);
    margin-bottom: 12px;
}

.avatar-hero-sub {
    font-size: 7px;
    color: var(--color-off-white);
    letter-spacing: 2px;
    line-height: 2.2;
}

/* ================================================
   CREATOR LAYOUT
   ================================================ */

.avatar-section {
    background-color: var(--color-bg);
}

.avatar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 32px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 48px;
    align-items: start;
}

/* ================================================
   CANVAS PANEL
   ================================================ */

.canvas-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 120px;
}

.canvas-frame {
    border: 4px solid var(--color-red);
    box-shadow:
        8px 8px 0 0 var(--color-red-dark),
        inset 0 0 0 2px var(--color-gray);
    background-color: #000;
    padding: 0;
    line-height: 0;
}

#avatar-canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.canvas-label {
    font-size: 6px;
    color: var(--color-gray);
    letter-spacing: 2px;
    text-align: center;
}

/* Download button */
#download-btn {
    display: inline-block;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    color: var(--color-white);
    background-color: var(--color-red);
    padding: 14px 20px;
    letter-spacing: 2px;
    border: 3px solid var(--color-white);
    box-shadow: 5px 5px 0 0 var(--color-red-dark);
    cursor: pointer;
    transition: none;
    width: 100%;
    text-align: center;
}

#download-btn:hover {
    background-color: var(--color-red-light);
    box-shadow: 2px 2px 0 0 var(--color-red-dark);
    transform: translate(3px, 3px);
}

#download-btn:active {
    box-shadow: none;
    transform: translate(5px, 5px);
}

/* ================================================
   CONTROLS PANEL
   ================================================ */

.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ---- Control group ---- */

.control-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.control-group-label {
    font-size: 7px;
    color: var(--color-red);
    letter-spacing: 3px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-red-dark);
}

/* ---- Layer option buttons ---- */

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

.layer-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 6px;
    color: var(--color-off-white);
    background-color: #150000;
    border: 2px solid var(--color-gray);
    padding: 8px 12px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: none;
    box-shadow: 3px 3px 0 0 #0a0000;
}

.layer-btn:hover {
    color: var(--color-white);
    border-color: var(--color-red-dark);
    background-color: #1f0000;
    box-shadow: 1px 1px 0 0 #0a0000;
    transform: translate(2px, 2px);
}

.layer-btn--active {
    color: var(--color-white);
    background-color: var(--color-red-dark);
    border-color: var(--color-red-light);
    box-shadow: 3px 3px 0 0 var(--color-red-dark);
}

.layer-btn--active:hover {
    background-color: var(--color-red);
    transform: none;
}

/* ---- Number picker ---- */

.number-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

#number-input {
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    color: var(--color-red-light);
    background-color: #0a0000;
    border: 3px solid var(--color-red-dark);
    padding: 8px 12px;
    width: 72px;
    text-align: center;
    outline: none;
    box-shadow: inset 2px 2px 0 0 #000;
    -moz-appearance: textfield;
}

#number-input::-webkit-outer-spin-button,
#number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#number-input:focus {
    border-color: var(--color-red);
    box-shadow: inset 2px 2px 0 0 #000, 0 0 0 2px var(--color-red-dark);
}

.number-hint {
    font-size: 6px;
    color: var(--color-gray);
    letter-spacing: 1px;
    line-height: 2;
}

/* ---- Name input ---- */

.name-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

#name-input {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    color: var(--color-white);
    background-color: #0a0000;
    border: 3px solid var(--color-red-dark);
    padding: 10px 14px;
    width: 220px;
    outline: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: inset 2px 2px 0 0 #000;
}

#name-input:focus {
    border-color: var(--color-red);
    box-shadow: inset 2px 2px 0 0 #000, 0 0 0 2px var(--color-red-dark);
}

.name-hint {
    font-size: 6px;
    color: var(--color-gray);
    letter-spacing: 1px;
}

/* ================================================
   SHARE STRIP
   ================================================ */

.avatar-share-strip {
    background-color: #0a0000;
    border-top: 4px solid var(--color-red-dark);
    position: relative;
    z-index: 3;
}

.share-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.share-text {
    font-size: 8px;
    color: var(--color-off-white);
    letter-spacing: 1px;
    line-height: 2.4;
}

.share-text span {
    color: var(--color-red);
}

/* ================================================
   TAKIM BUTONU — renk noktası
   ================================================ */

.team-btn {
    display: flex;
    align-items: center;
    gap: 7px;
}

.team-swatch {
    display: inline-block;
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    outline: 2px solid;
    outline-offset: 1px;
}

/* ================================================
   STAT SATIRLARI
   ================================================ */

.stats-controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stat-row {
    display: grid;
    grid-template-columns: 30px 1fr 28px;
    align-items: center;
    gap: 10px;
}

.stat-row-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 6px;
    color: var(--color-red-light);
    letter-spacing: 1px;
}

.stat-row-val {
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    color: var(--color-white);
    text-align: right;
    letter-spacing: 1px;
}

.stat-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background-color: #1a1a1a;
    border: 2px solid #333333;
    outline: none;
    cursor: pointer;
}

.stat-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 20px;
    background-color: var(--color-red);
    border: 2px solid var(--color-white);
    cursor: pointer;
}

.stat-slider::-moz-range-thumb {
    width: 12px;
    height: 20px;
    background-color: var(--color-red);
    border: 2px solid var(--color-white);
    border-radius: 0;
    cursor: pointer;
}

.stat-slider:focus {
    border-color: var(--color-red-dark);
}

/* ================================================
   RASTGELELEŞTİR BUTONU
   ================================================ */

.randomize-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    color: var(--color-white);
    background-color: #150000;
    border: 2px solid var(--color-red-dark);
    padding: 10px 16px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: none;
    box-shadow: 3px 3px 0 0 #0a0000;
    margin-top: 8px;
    display: inline-block;
}

.randomize-btn:hover {
    background-color: var(--color-red-dark);
    border-color: var(--color-red);
    box-shadow: 1px 1px 0 0 #0a0000;
    transform: translate(2px, 2px);
}

.randomize-btn:active {
    box-shadow: none;
    transform: translate(3px, 3px);
}

/* ================================================
   MOBILE RESPONSIVE — Avatar Sayfası
   ================================================ */

@media (max-width: 760px) {

    .avatar-hero {
        padding: 28px 20px;
    }

    /* Canvas + kontroller dikey dizil */
    .avatar-inner {
        grid-template-columns: 1fr;
        padding: 32px 20px;
        gap: 28px;
    }

    /* Sticky kaldır — scroll bozar */
    .canvas-panel {
        position: static;
        top: auto;
    }

    /* İsim inputu tam genişlik */
    #name-input {
        width: 100%;
        max-width: 100%;
    }

    /* Share strip dikey */
    .share-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 28px 20px;
    }

    .share-text {
        font-size: 7px;
    }
}
