@import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&display=swap');

body {
    font-family: 'Luckiest Guy', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 30%, #fffde7 60%, #ffe066 100%);
    overflow-x: hidden;
    position: relative;
    cursor: url('Characters/Link.cur'), pointer;
    padding-bottom: 70px; /* přidej padding-bottom, aby obsah nebyl footerem překrytý */
}

.animated-bg {
    position: fixed;
    z-index: 0;
    width: 100vw;
    height: 100vh;
    top: 0; left: 0;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(135deg, #ffe066 0%, #ffb347 100%);
}
.bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0.25;
    background: radial-gradient(circle at 30% 30%, #fffde7 60%, #ffe066 100%);
    animation: float 14s infinite linear;
    filter: blur(1px);
}
.bubble1 { width: 140px; height: 140px; left: 8vw; top: 80vh; animation-delay: 0s;}
.bubble2 { width: 100px; height: 100px; left: 82vw; top: 90vh; animation-delay: 2s;}
.bubble3 { width: 70px; height: 70px; left: 50vw; top: 100vh; animation-delay: 4s;}
.bubble4 { width: 120px; height: 120px; left: 28vw; top: 95vh; animation-delay: 6s;}
.bubble5 { width: 90px; height: 90px; left: 70vw; top: 110vh; animation-delay: 8s;}
.bubble6 { width: 60px; height: 60px; left: 18vw; top: 120vh; animation-delay: 10s;}

@keyframes float {
    0% { transform: translateY(0) scale(1);}
    100% { transform: translateY(-120vh) scale(1.1);}
}

main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.main-card {
    margin: 48px auto 32px auto;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 650px;
    z-index: 2;
    animation: masterpiece-pop 1.2s cubic-bezier(.68,-0.55,.27,1.55);
}

@keyframes masterpiece-pop {
    0% { transform: scale(0.92); opacity: 0; }
    80% { transform: scale(1.04); opacity: 1; }
    100% { transform: scale(1); }
}

header {
    text-align: center;
    margin-bottom: 18px;
    width: 100%;
}
.header-icon {
    width: 90px;
    height: 90px;
    margin-bottom: -10px;
    margin-right: 10px;
    filter: drop-shadow(0 0 18px #ffe06688);
    animation: spin 8s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(-10deg);}
    100% { transform: rotate(350deg);}
}
h1 {
    color: #ff6f00;
    text-shadow: 0 2px 16px #ffe066, 0 0 10px #ffb347;
    font-size: 2.5em;
    margin: 0 0 8px 0;
    letter-spacing: 2px;
    font-family: 'Luckiest Guy', Arial, sans-serif;
    animation: fade-in-down 1s;
}
@keyframes fade-in-down {
    from { opacity: 0; transform: translateY(-40px);}
    to { opacity: 1; transform: translateY(0);}
}
.subtitle {
    color: #795548;
    font-size: 1.2em;
    margin: 0 0 18px 0;
    font-family: Arial, sans-serif;
    font-weight: bold;
    letter-spacing: 1px;
    animation: fade-in 1.2s;
}

.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 32px 0 40px 0;
    gap: 0;
    width: 100%;
}
.wizard-dot {
    width: 52px;
    height: 52px;
    background: #ffe066;
    border: 4px solid #ffb347;
    border-radius: 50%;
    color: #b26a00;
    font-size: 1.6em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Luckiest Guy', Arial, sans-serif;
    transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
    z-index: 2;
    margin: 0 0.5em;
    opacity: 0.7;
    box-shadow: 0 2px 8px #ffb34733;
    animation: pop-in 0.7s;
}
.wizard-dot.active {
    background: #ffb347;
    color: #fffde7;
    border: 4px solid #ff6f00;
    opacity: 1;
    box-shadow: 0 4px 24px #ffb34799;
    animation: glow 1.5s infinite alternate;
}
@keyframes glow {
    from { box-shadow: 0 4px 24px #ffb34799; }
    to   { box-shadow: 0 0px 40px #ffe066cc, 0 4px 24px #ffb34799;}
}
.wizard-line {
    flex: 1 1 0;
    height: 10px;
    background: linear-gradient(90deg, #ffe066 60%, #ffb347 100%);
    border-radius: 5px;
    margin: 0 -8px;
    box-shadow: 0 2px 8px #ffb34733;
}

.wizard-step {
    display: none;
    flex-direction: column;
    align-items: center;
    background: #fffde7ee;
    border-radius: 36px;
    box-shadow: 0 8px 32px #ffb34744;
    border: 4px solid #ffb347;
    padding: 48px 36px 40px 36px;
    margin-bottom: 36px;
    width: 100%;
    max-width: 540px;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    gap: 40px;
    animation: fade-in 0.7s;
}
.wizard-step.step-visible {
    display: flex;
}

h2 {
    color: #ff6f00;
    text-shadow: 1px 1px 0 #fff176, 0 0 10px #ffb347;
    font-size: 2em;
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
    font-family: 'Luckiest Guy', Arial, sans-serif;
    animation: fade-in-down 1s;
}
.step-desc {
    color: #795548;
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 18px;
    margin-top: 0;
    font-family: Arial, sans-serif;
    font-weight: bold;
    letter-spacing: 1px;
    animation: fade-in 1.2s;
}

.settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    margin-bottom: 18px;
    width: 100%;
    align-items: center;
}
.settings-row > div {
    flex: 1 1 160px;
    min-width: 160px;
    text-align: center;
}

#player-settings {
    display: block;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    padding: 0 0 32px 0;
    background: none;
    box-shadow: none;
    border: none;
}
.player-settings-simple {
    min-width: 340px;
    max-width: 340px;
    flex: 0 0 340px;
    scroll-snap-align: start;
}

.player-settings-simple {
    background: linear-gradient(135deg, #fffde7 80%, #ffe066 100%);
    border-radius: 32px;
    box-shadow: 0 6px 32px #ffb34733, 0 0 32px #ffe06633 inset;
    border: 2.5px solid #ffe066;
    padding: 32px 20px 24px 20px;
    margin: 18px auto 0 auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
    position: relative;
}

.player-settings-simple h3 {
    color: #ff6f00;
    font-size: 1.5em;
    margin: 0 0 18px 0;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 #fff176;
    font-family: 'Luckiest Guy', Arial, sans-serif;
}

.label-simple {
    font-weight: bold;
    color: #795548;
    margin-bottom: 8px;
    margin-top: 0;
    font-size: 1.1em;
    letter-spacing: 0.5px;
}

.tower-checkboxes-simple,
.hero-checkboxes-simple {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: none;
    border-radius: 0;
    padding: 0;
    min-height: 0;
    max-height: none;
    overflow: visible;
    width: 100%;
}

.tower-checkboxes-simple label,
.hero-checkboxes-simple label {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffe066;
    border-radius: 12px;
    border: 1.5px solid #ffb347;
    padding: 7px 16px 7px 7px;
    font-size: 1.08em;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s; /* NEOBSAHUJE transform */
    box-shadow: 0 1px 4px #ffb34722;
    width: 100%;
    box-sizing: border-box;
}

.tower-checkboxes-simple label:hover,
.hero-checkboxes-simple label:hover {
    background: #fff176;
    box-shadow: 0 2px 12px #ffb34733;
    /* transform: scale(1.03);  <-- ODSTRANIT */
    /* z-index: 2; <-- můžeš odstranit, není potřeba */
}

.icon-small {
    width: 30px;
    height: 30px;
    margin-right: 8px;
    border-radius: 8px;
    border: 1.5px solid #ffb347;
    background: #fffde7;
    box-shadow: 0 1px 2px #ffb34722;
    transition: box-shadow 0.2s, transform 0.2s;
    flex-shrink: 0;
}

/* Wizard navigation buttons */
.wizard-nav {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 24px;
    width: 100%;
}
.next-btn, .prev-btn, button {
    font-family: 'Luckiest Guy', Arial, sans-serif;
    font-size: 1.25em;
    padding: 16px 44px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(90deg, #ffb347 60%, #ffe066 100%);
    color: #fff;
    box-shadow: 0 2px 12px #ffb34755;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.1s, box-shadow 0.2s;
    margin: 0;
    letter-spacing: 1px;
    animation: fade-in 1.2s;
    position: relative;
    overflow: hidden;
}
.next-btn:after, .prev-btn:after, button:after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 0; height: 0;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
    z-index: 0;
}
.next-btn:hover:after, .prev-btn:hover:after, button:hover:after {
    width: 220%;
    height: 220%;
}
.next-btn:hover, .prev-btn:hover, button:hover {
    cursor: url('Characters/LINKanimated.ani'), url('Characters/Link.cur'), pointer;
    background: linear-gradient(90deg, #ffe066 60%, #ffb347 100%);
    color: #ff6f00;
    transform: scale(1.08);
    box-shadow: 0 4px 16px #ffb34799;
    z-index: 1;
}

/* Výsledky */
#results {
    margin-top: 18px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
}
.player-result {
    margin-bottom: 0;
    padding: 22px 18px;
    background: #fff9c4;
    border-radius: 18px;
    border: 2.5px solid #ffb347;
    box-shadow: 0 2px 16px #ffb34733;
    animation: fade-in 0.7s;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.player-result h3 {
    margin: 0 0 12px 0;
    color: #ff6f00;
    text-shadow: 1px 1px 0 #fff176;
    font-size: 1.2em;
    text-align: center;
}
.hero-item {
    background: linear-gradient(90deg, #ffe066 60%, #ffb347 100%);
    padding: 10px 18px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    color: #795548;
    font-weight: bold;
    border: 2px solid #ffb347;
    box-shadow: 0 1px 6px #ffb34733;
    font-size: 1.1em;
    animation: pop-in 0.6s;
}
.icon-large {
    width: 54px;
    height: 54px;
    vertical-align: middle;
    margin-right: 10px;
    border-radius: 12px;
    border: 2.5px solid #ffb347;
    background: #fffde7;
    box-shadow: 0 2px 8px #ffb34733;
}
#tower-list {
    margin-top: 18px;
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.tower-item {
    background: #ffe066;
    margin: 0;
    padding: 8px 14px 8px 8px;
    border-radius: 10px;
    border: 1.5px solid #ffb347;
    color: #795548;
    font-weight: bold;
    box-shadow: 0 1px 4px #ffb34733;
    display: flex;
    align-items: center;
    font-size: 1.05em;
    animation: pop-in 0.5s;
    transition: transform 0.15s;
}
.tower-item img {
    width: 38px;
    height: 38px;
    margin-right: 6px;
    border-radius: 8px;
    border: 2px solid #ffb347;
    background: #fffde7;
    box-shadow: 0 2px 4px #ffb34733;
}
.tower-item:hover {
    background: #fff176;
    transform: scale(1.08);
}

/* Animace */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(30px);}
    to { opacity: 1; transform: translateY(0);}
}
@keyframes pop-in {
    0% { opacity: 0; transform: scale(0.7);}
    80% { opacity: 1; transform: scale(1.08);}
    100% { opacity: 1; transform: scale(1);}
}

/* Responsivita */
@media (max-width: 800px) {
    .main-card, .wizard-step {
        max-width: 98vw;
        padding-left: 2vw;
        padding-right: 2vw;
    }
    .player-settings-simple, .player-result {
        max-width: 98vw;
        padding-left: 2vw;
        padding-right: 2vw;
    }
    .wizard-step {
        padding: 24px 4vw 24px 4vw;
    }
    h1 {
        font-size: 1.4em;
    }
}

@media (max-width: 600px) {
    .main-card, .wizard-step, .player-settings-simple, .player-result {
        max-width: 100vw;
        padding-left: 2vw;
        padding-right: 2vw;
    }
    .wizard-step {
        padding: 16px 2vw 16px 2vw;
    }
    h1 {
        font-size: 1.1em;
    }
    .header-icon {
        width: 60px;
        height: 60px;
    }
    .wizard-dot {
        width: 36px;
        height: 36px;
        font-size: 1em;
    }
    .next-btn, .prev-btn, button {
        font-size: 1em;
        padding: 10px 16px;
    }
}

#lang-switch {
    position: fixed;
    left: 24px;
    bottom: 84px;
    z-index: 1000;
    display: flex;
    gap: 12px;
    background: rgba(255,253,231,0.85);
    border-radius: 12px;
    padding: 8px 14px;
    box-shadow: 0 2px 12px #ffb34755;
    align-items: center;
}
.flag {
    width: 32px;
    height: 24px;
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: border 0.2s, transform 0.2s;
}
.flag.selected, .flag:hover {
    border: 2px solid #ffb347;
    transform: scale(1.12);
}

.accordion-player {
    margin-bottom: 22px;
    border-radius: 18px;
    box-shadow: 0 2px 12px #ffb34722;
    background: #fffde7;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.accordion-toggle {
    width: 100%;
    text-align: left;
    background: linear-gradient(90deg, #ffe066 60%, #ffb347 100%);
    color: #ff6f00;
    font-family: 'Luckiest Guy', Arial, sans-serif;
    font-size: 1.2em;
    padding: 18px 28px;
    border: none;
    outline: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    border-bottom: 2px solid #ffb347;
    border-radius: 18px 18px 0 0;
    position: relative;
    box-shadow: 0 2px 8px #ffb34733;
}
.accordion-toggle:hover,
.accordion-toggle:focus {
    background: linear-gradient(90deg, #fff176 60%, #ffb347 100%);
    color: #b26a00;
    box-shadow: 0 4px 16px #ffb34755;
    outline: none;
}
.accordion-toggle[aria-expanded="true"] {
    background: linear-gradient(90deg, #ffb347 60%, #ffe066 100%);
    color: #b26a00;
    box-shadow: 0 6px 24px #ffb34744;
}
.accordion-toggle:after {
    content: "▼";
    float: right;
    margin-left: 12px;
    font-size: 1em;
    transition: transform 0.3s;
}
.accordion-toggle[aria-expanded="true"]:after {
    transform: rotate(-180deg);
}
.accordion-content {
    padding: 0 0 18px 0;
    animation: fade-in 0.5s;
    background: none;
}

footer {
    width: 100%;
    background: #ffe066cc;
    color: #b26a00;
    text-align: center;
    font-size: 1.05em;
    padding: 1px 0 1px 0;
    border-top: 2px solid #ffb347;
    box-shadow: 0 -2px 16px #ffb34722;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 100;
}
footer a {
    color: #b26a00;
    text-decoration: underline;
    font-size: 0.98em;
    transition: color 0.2s;
}
footer a:hover {
    color: #ff6f00;
}

.error-result {
    border: 2.5px solid #e53935;
    background: #fff3f3;
    color: #e53935;
}
.error-msg {
    color: #e53935;
    font-weight: bold;
    font-size: 1.1em;
    display: block;
    margin-top: 10px;
}

header2 {
    width: 100%;
    background: #ffe066cc;
    color: #b26a00;
    text-align: center;
    font-size: 1.05em;
    padding: 18px 0 12px 0;
    border-bottom: 2px solid #ffb347;
    box-shadow: 0 -2px 16px #ffb34722;
    position: fixed;
    left: 0;
    bottom: 1275px;
    z-index: 100;
}
header2 a {
    color: #b26a00;
    text-decoration: underline;
    font-size: 0.98em;
    transition: color 0.2s;
}
header2 a:hover {
    color: #ff6f00;
}

.select-all-towers, .deselect-all-towers,
.select-all-heroes, .deselect-all-heroes {
    font-size: 0.95em;
    padding: 4px 12px;
    border-radius: 8px;
    border: 1.5px solid #ffb347;
    background: #fffde7;
    color: #b26a00;
    cursor: pointer;
    margin-bottom: 4px;
    transition: background 0.2s, color 0.2s;
}
.select-all-towers:hover, .deselect-all-towers:hover,
.select-all-heroes:hover, .deselect-all-heroes:hover {
    background: #ffe066;
    color: #ff6f00;
}