/* =========================================================
RESET
========================================================= */

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 24px;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    color: var(--text-color);
    background: var(--bg-color);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    transition:
        background 0.3s ease,
        color 0.3s ease;
}


/* =========================================================
THEME VARIABLES
========================================================= */

:root {
    --bg-color: linear-gradient(118deg, #fff5fa, #f5f8ff);
    --container-bg: #ffffff;

    --text-color: #25213b;
    --secondary-text: #77728c;

    --card-bg: #ffffff;
    --border-color: #eee7ed;

    --accent: #e89ab5;
    --accent-dark: #d97899;
    --accent-light: #fdf2f6;

    --wheel-bg: #ffffff;

    --shadow:
        0 25px 70px rgba(60, 40, 55, 0.08);
}


/* =========================================================
DARK MODE VARIABLES
========================================================= */

body.dark-mode {
    --bg-color: linear-gradient(118deg, #111111, #1a1719);
    --container-bg: #181818;

    --text-color: #f7f4f5;
    --secondary-text: #aaa3a7;

    --card-bg: #1e1e1e;
    --border-color: #383236;

    --accent: #e89ab5;
    --accent-dark: #d97899;
    --accent-light: #2a2024;

    --wheel-bg: #1c1c1c;

    --shadow:
        0 25px 70px rgba(0, 0, 0, 0.45);
}


/* =========================================================
MAIN CONTAINER
========================================================= */

.container {
    position: relative;

    width: 100%;
    max-width: 650px;

    padding: 34px;

    background: var(--container-bg);

    border-radius: 30px;

    box-shadow:0 5px 20px rgba(0,0,0,.15);

    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}


/* =========================================================
HEADER
========================================================= */

.header {
    position: relative;

    text-align: center;

    margin-bottom: 28px;
}

.logo {
    width: 58px;
    height: 58px;

    margin: 0 auto 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 29px;

    border-radius: 18px;

    background: #fff7fa;

    border: 1px solid #f4dce5;

    box-shadow:
        0 8px 22px rgba(216, 120, 153, 0.10);
}

body.dark-mode .logo {
    background: #282024;
    border-color: #46343c;
}

h1 {
    margin: 0;

    color: var(--text-color);

    font-size: 32px;
    line-height: 1.1;
    font-weight: 800;

    letter-spacing: -1px;
}

.subtitle {
    margin: 9px 0 0;

    color: var(--secondary-text);

    font-size: 15px;
    line-height: 1.5;
}


/* =========================================================
DARK MODE ICON
========================================================= */

.theme-toggle {
    position: absolute;

       top: 15px;
    right: 15px;

    width: 38px;
    height: 38px;

    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border-color);
    border-radius: 50%;

    background: var(--card-bg);
    color: var(--text-color);

    font-size: 17px;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);

    border-color: var(--accent);
    background: var(--accent-light);
}

.theme-toggle:active {
    transform: translateY(0);
}


/* =========================================================
COMPACT PREVIEW
========================================================= */

.preview {
    position: relative;

    min-height: 125px;

    overflow: hidden;

    margin-bottom: 22px;
    padding: 18px 16px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border-radius: 20px;

    background: var(--card-bg);

    border: 2px solid var(--border-color);

    box-shadow:
        0 6px 20px rgba(80, 45, 60, 0.05);

    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

body.dark-mode .preview {
    background: #202020;
    border-color: #40343a;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.22);
}

.preview-label {
    position: relative;
    z-index: 2;

    margin-bottom: 9px;

    color: var(--secondary-text);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1.7px;

    text-transform: uppercase;
}


/* =========================================================
PREVIEW EMOJIS — LARGE + NO SPACE
========================================================= */

.preview strong {
    position: relative;
    z-index: 2;

    width: 100%;
    min-height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--text-color);

    font-size: 48px;
    line-height: 1;

    gap: 0;
    letter-spacing: -8px;
    word-spacing: 0;

    white-space: nowrap;

    text-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08);
}

.preview strong span,
.preview strong .emoji {
    margin: 0;
    padding: 0;
}


/* =========================================================
CATEGORY
========================================================= */

.category-box {
    margin-bottom: 25px;
}

.category-box label {
    display: block;

    margin-bottom: 9px;

    color: var(--text-color);

    font-size: 13px;
    font-weight: 700;
}

.select-wrapper {
    position: relative;
}

select {
    width: 100%;

    appearance: none;
    -webkit-appearance: none;

    padding: 15px 48px 15px 17px;

    color: var(--text-color);

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;

    background: var(--wheel-bg);

    border: 2px solid var(--border-color);
    border-radius: 15px;

    outline: none;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.3s ease,
        color 0.3s ease;
}

select:hover {
    border-color: var(--accent);
}

select:focus {
    border-color: var(--accent-dark);

    box-shadow:
        0 0 0 4px rgba(232, 154, 181, 0.12);
}

.select-wrapper::after {
    content: "⌄";

    position: absolute;

    top: 50%;
    right: 17px;

    transform: translateY(-55%);

    color: var(--secondary-text);

    font-size: 19px;
    font-weight: 700;

    pointer-events: none;
}


/* =========================================================
SLOT LABELS
========================================================= */

.slot-labels {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 14px;

    margin-bottom: 9px;
}

.slot-label {
    text-align: center;

    color: var(--secondary-text);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.2px;
}


/* =========================================================
WHEELS
========================================================= */

.wheels {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 14px;

    margin-bottom: 5px;
}

.wheel {
    position: relative;

    width: 100%;
    height: 250px;

    overflow: hidden;

    border-radius: 22px;

    background: var(--wheel-bg);

    border: 2px solid var(--border-color);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 7px 18px rgba(49, 57, 88, 0.05);

    touch-action: none;
    overscroll-behavior: contain;
    user-select: none;

    cursor: grab;

    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

body.dark-mode .wheel {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 7px 18px rgba(0, 0, 0, 0.25);
}

.wheel:active {
    cursor: grabbing;
}


/* =========================================================
WHEEL FADE
========================================================= */




/* =========================================================
SELECTION AREA
========================================================= */

.selection-line {
    position: absolute;

    left: 7px;
    right: 7px;

    top: 100px;

    height: 50px;

    z-index: 4;

    border: 1px solid rgba(232, 154, 181, 0.45);

    border-radius: 14px;

    background: rgba(232, 154, 181, 0.05);

    box-shadow:
        0 0 18px rgba(232, 154, 181, 0.06);

    pointer-events: none;
}


/* =========================================================
EMOJI TRACK
========================================================= */

.emoji-track {
    position: absolute;

    top: 0;

    left: 0;
    right: 0;

    width: 100%;

    transition:
        transform 0.15s ease;

    will-change: transform;
}


/* =========================================================
EMOJI ITEMS — CENTERED
========================================================= */

.emoji-item {
    width: 100%;
    height: 50px;
    min-height: 50px;

    display: flex;

    align-items: center;
    justify-content: center;

    line-height: 1;
    text-align: center;

    font-size: 32px;

    opacity: 0.55;

    transform: scale(0.78);

    transform-origin: center center;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        filter 0.2s ease;

    cursor: pointer;
}

.emoji-item:hover {
    opacity: 0.9;
}

.emoji-item.selected {
    opacity: 1;

    transform: scale(1.15);

    filter:
        drop-shadow(
            0 5px 8px rgba(0, 0, 0, 0.10)
        );
}


/* =========================================================
BUTTONS
========================================================= */

.button-group {
    display: grid;

    grid-template-columns: 1.2fr 1fr;

    gap: 12px;
}

button {
    min-height: 54px;

    border-radius: 16px;

    font-family: inherit;

    font-size: 15px;
    font-weight: 750;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}


/* =========================================================
GENERATE BUTTON
========================================================= */

.generate-btn {
    color: #ffffff;

    background: #e85d8f;

    border: 1px solid #f9a8c2;

    box-shadow:
        0 9px 22px rgba(232, 93, 143, 0.18);

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);

    background: #d94f82;

    box-shadow:
        0 14px 28px rgba(232, 93, 143, 0.24);
}

.generate-btn:active {
    transform: translateY(0);

    box-shadow:
        0 7px 16px rgba(232, 93, 143, 0.18);
}


/* =========================================================
COPY BUTTON
========================================================= */

.copy-btn {
  color: #fff;
  background: #2abad2;

    border: 1px solid var(--border-color);
}

.copy-btn:hover {
    transform: translateY(-2px);

    border-color: var(--accent);

      background: #2a94d2;
}

.copy-btn.copied {
    color: #ffffff;

  background: #2a94d2;

    border-color: transparent;

    box-shadow:
        0 10px 24px rgba(34, 168, 115, 0.18);
}


/* =========================================================
INTERACTION HINT
========================================================= */

.interaction-hint {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    margin: 5px 5px 20px;

    color: var(--secondary-text);

    font-size: 12px;
}

.interaction-hint span {
    width: 22px;
    height: 22px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border-radius: 7px;

    background: var(--accent-light);

    color: var(--accent-dark);
}


/* =========================================================
FOOTER
========================================================= */

.footer {
    width: 100%;
    max-width: 650px;

    margin-top: 12px;

    text-align: center;

    flex-shrink: 0;
}

.footer a {
    color: #ff6aa8;

    text-decoration: none;

    margin: 0 6px;

    font-size: 12px;
}

.footer a:hover {
    text-decoration: underline;
}

.footer span {
    color: #ccc;
}


/* =========================================================
TABLET
========================================================= */

@media (max-width: 700px) {

    body {
        padding: 18px;
    }

    .container {
        padding: 28px 24px;
    }

    .preview {
        min-height: 170px;
    }
}


/* =========================================================
MOBILE
========================================================= */

@media (max-width: 600px) {

    body {
        display: flex;
        flex-direction: column;

        min-height: 100dvh;
        background: #fff;
        padding: 0;
        margin: 0;
    }

        #preview {
        gap: 10px;
    }

    #preview span {
        font-size: 2.5rem;
    }

    .container {
        width: 100%;

        padding: 22px 15px 20px;
        box-shadow: none;
        border-radius: 0;
    }

    .header {
        margin-bottom: 22px;
    }

    .logo {
        width: 48px;
        height: 48px;

        margin-bottom: 12px;

        font-size: 25px;

        border-radius: 15px;
    }

    h1 {
        font-size: 27px;

        letter-spacing: -0.7px;
    }

    .subtitle {
        max-width: 300px;

        margin: 8px auto 0;

        font-size: 13px;
    }


    /* Mobile theme icon */

    .theme-toggle {
        top: -2px;
        right: 0;

        width: 34px;
        height: 34px;

        font-size: 15px;
    }


    /* Mobile preview */

    .preview {
        min-height: 115px;

        margin-bottom: 20px;

        padding: 16px 8px;

        border-radius: 18px;
    }

    .preview-label {
        margin-bottom: 8px;

        font-size: 8px;
        letter-spacing: 1.4px;
    }

    .preview strong {
        min-height: 45px;

        font-size: 42px;

        letter-spacing: -7px;

        gap: 0;
        word-spacing: 0;
    }


    /* Category */

    .category-box {
        margin-bottom: 21px;
    }

    .category-box label {
        margin-bottom: 8px;

        font-size: 12px;
    }

    select {
        padding: 14px 44px 14px 14px;

        font-size: 14px;

        border-radius: 14px;
    }


    /* Wheel labels */

    .slot-labels {
        gap: 7px;

        margin-bottom: 7px;
    }

    .slot-label {
        font-size: 8px;

        letter-spacing: 0.7px;
    }


    /* Wheels */

.wheel {
    width: 100%;
    height: 250px;

    border-radius: 17px;
}


    .wheel::before,
    .wheel::after {
        height: 75px;
    }

 .selection-line {
    top: 100px;

    height: 50px;

    left: 5px;
    right: 5px;

    border-radius: 11px;
}

.emoji-track {
    top: 0;
}

.emoji-item {
    height: 50px;
    min-height: 50px;

    font-size: 32px;
}

    .emoji-item.selected {
        transform: scale(1.15);
    }


    /* Buttons */

    .button-group {
     display: grid;

    grid-template-columns: 1.2fr 1fr;

    gap: 12px;
    }

    button {
        width: 100%;

        min-height: 52px;

        border-radius: 14px;

        font-size: 14px;
    }

    .interaction-hint {
        margin-top: 14px;

        font-size: 11px;
    }


    /* Mobile footer */

    .footer {
        width: 100%;
        max-width: none;

        margin-top: 12px;

        padding: 0 10px 15px;
    }

    .footer a {
        font-size: 11px;
        margin: 0 4px;
    }
}


/* =========================================================
SMALL PHONES
========================================================= */

@media (max-width: 380px) {

    body {
        padding: 0;
        margin: 0;

        display: flex;
        flex-direction: column;
    }

    .container {
        border-radius: 0;

        padding: 19px 11px 17px;
    }

    .header {
        margin-bottom: 19px;
    }

    .logo {
        width: 44px;
        height: 44px;

        font-size: 23px;

        border-radius: 13px;
    }

    h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 12px;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;

        font-size: 14px;
    }

    .preview {
        min-height: 105px;

        padding: 14px 6px;

        margin-bottom: 18px;

        border-radius: 16px;
    }

    .preview strong {
        min-height: 40px;

        font-size: 38px;

        letter-spacing: -6px;
    }

    .wheels {
        gap: 5px;
    }

  .wheel {
    height: 250px;

    border-radius: 15px;
}

.selection-line {
    top: 100px;
}

.emoji-track {
    top: 0;
}


    .emoji-item {
        height: 50px;

        font-size: 30px;
    }

    .emoji-item.selected {
        transform: scale(1.15);
    }

    .slot-label {
        font-size: 7px;
    }

    button {
        min-height: 50px;

        font-size: 13px;
    }

    .footer {
        margin-top: 10px;
        padding-bottom: 14px;
    }
}

.breadcrumbs {
    display: flex;
  
    justify-content:left;
    flex-wrap: wrap;
    gap: 8px;

    padding: 12px 18px;

    border-radius: 15px;
    font-size: 14px;
    max-width: fit-content;
  
}


.breadcrumbs a {
    color: #ff69b4;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s ease;
}


.breadcrumbs a:hover {
    color: #e91e8f;
    text-decoration: underline;
}


.breadcrumbs span {
    color: #999;
    font-weight: 600;
}

#preview {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

#preview span {
    display: inline-block;
    line-height: 1;
}

.emoji-wheel {
    touch-action: none;
    overscroll-behavior: contain;
}


/* =========================================================
   MOBILE TOP — LOGO LEFT + DARK MODE RIGHT
   ========================================================= */

.mobile-top {
    display: none;
}

@media (max-width: 600px) {

.mobile-top {
        display: flex;

        width: 100%;
        height: 44px;

        align-items: center;
        justify-content: flex-start;

        margin-bottom: 10px;
    }

    .mobile-logo {
        width: 120px;
        height: 44px;

        display: flex;
        align-items: center;
    }

    .mobile-logo img {
        display: block;

        width: 120px;
        height: 44px;

        object-fit: contain;
    }

    /* Dark toggle remains top-right */
    .theme-toggle {
        top: 15px;
        right: 15px;
    }

    .breadcrumbs {
        margin-top: 0;
    }

    /* Hide desktop header logo */
    .desktop-logo {
        display: none;
    }

}


#shareButton {
            margin: 20px auto;
            display: block;
            padding: 10px 20px;
            cursor: pointer;
            background-color: var(--card-bg);
            border: 1px solid #e2e8f0;
            color: #25305b;
            font-weight: 600;
            border-radius: 30px;
            font-size: 0.9rem;
            transition: all 0.2s ease;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        }

        #shareButton:hover {
            background-color: var(--card-hover);
            border-color: var(--accent);
            transform: translateY(-1px);
        }



        body.dark-mode #shareButton  {
            color: #fff;

        }