/* GLOBAL */
body {
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
    height: 100vh;
    overflow: hidden;
    background: #a0d8ff;
}

button:hover {
    transform: scale(1.05);
}



#loading-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, #0b3c5d, #021a2e);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: #cceeff;
    font-size: 22px;
     transition: opacity 0.5s ease;
}

#loading-icon {
    width: 120px;
    margin-bottom: 20px;
    animation: float 2s ease-in-out infinite;
}

/* jemné plavání */
@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0); }
}
 

#game-area {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: url("background1.png") center/cover no-repeat;
    
}

/* START SCREEN */
#start-screen {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    text-align: center;
    cursor: pointer;
}

#level-text,
#dog-message {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
}  

#dog-intro {
    width: 500px;
    height: auto;
    margin-bottom: 20px;
    z-index: 101;
}

#start-content {
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 20px 30px;
    border-radius: 20px;
    max-width: 600px;
}

/* DOG VE HŘE */
#dog-wrapper {
    position: absolute;
    top: 15px;
    left: 15px;
    transform: none;
    z-index: 200;
}




#dog-gif {
    width: 270px;
    height: auto;
    display: none;
}

#dog-text {
    position: absolute;
    top: 10px;       /* nahoře */
    left: 200px;      /* vlevo */
    transform: none; /* zruší posun -50% */
    display: none;
      background: rgba(0, 0, 0, 0.55);
     color: #cceeff;
    border: 5px solid #66ccff;
    border-radius: 14px;
    font-size: 18px;
    line-height: 1.2;
       padding: 14px 18px;
    min-width: max-content;
    text-align: left;
    pointer-events: none;
    z-index: 200; /* nad skóre */
}


/* RYBY */
.fish {
    position: absolute;
    width: 400px;
    cursor: pointer;
    z-index: 15;
    display: none;
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.9))
           drop-shadow(0 0 30px rgba(180,220,255,0.8));
    transition: transform 0.2s, filter 0.2s;
}

.fish:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 25px white)
           drop-shadow(0 0 45px rgba(180,220,255,1));
}

#fish1 { top: 30%; left: 20%; }
#fish2 { top: 50%; left: 50%; }
#fish3 { top: 5%; left: 58%; }

/* SKÓRE */
#score-container {
    position: absolute;
    top: 10px;
    right: 30px;
    color: white;
    font-size: 22px;
    z-index: 2000;
}
#score {
    position: static;
}

/* MUŠLE */
.shell {
    position: absolute;
    width: 50px;
    height: 50px;
    pointer-events: auto;
    cursor: pointer;
    z-index: 50;
}

/* DIALOG */
#dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 25px 35px;
    border-radius: 20px;
    text-align: center;
    z-index: 1000;
    display: none;
}

#dialog button {
    margin-top: 15px;
    font-size: 18px;
    padding: 10px 25px;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background-color: #1e90ff;
    color: white;
}

/* END SCREEN */
.end-text {
    position: absolute;
    bottom: 22%;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 28px;
      z-index: 20;
    text-shadow: 0 0 10px black;
}

.end-btn {
       position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 25;
    padding: 14px 30px;
    font-size: 20px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #1e90ff, #00cfff);
    color: white;
    box-shadow: 0 0 20px rgba(0,200,255,0.6);
}

.end-btn:hover {
    transform: translateX(-50%) scale(1.05);
}

/* CHOBOTNICE */
#octopus-img {
    position: absolute;
    bottom: 40px;
    right: 120px;
    width: 260px;
    cursor: pointer;
    z-index: 300;

    transform: scale(1);
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 0 15px rgba(0,255,255,0.5));
}

#octopus-img:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 30px rgba(0,255,255,0.9));
}

#octopus-wrapper {
    position: absolute;
    bottom: 40px;
    right: 120px;
}

.octopus-dialog {
    position: absolute;
    top: 82%; /* ⬅️ zkus 80–88 % */
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    text-align: center;
}



#dialog button {
    margin: 6px;
    padding: 8px 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}


/* PEARL MODAL */
#pearl-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7); /* ztmavení kolem */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none; /* aktivujeme až po správném quizu */
}

#pearl-modal img {
    width: 250px;
    cursor: pointer;
}

/* LEVEL OVERLAY */
#level-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5); /* poloprůhledná černá pro ztmavení */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 500; /* nad hrou, pod dialogem */
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; /* kliky projdou hrou */
}

#level-text {
    color: white;
    font-size: 48px;
    font-weight: bold;
    text-shadow: 0 0 15px black;
}

#name-modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.7);
    z-index: 2000; /* nad vším */
}

#name-box {
    background: rgba(0,0,0,0.9);
    padding: 30px 40px;
    border-radius: 20px;
    text-align: center;
    color: #cceeff;
}


#name-box input {
    font-size: 18px;
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    margin-top: 10px;
    width: 200px;
}

#name-box input:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(100,200,255,0.8);
}


#name-box button {
    margin-top: 15px;
    font-size: 18px;
    padding: 10px 25px;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background-color: #1e90ff;
    color: white;
}


.win-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #001f3f, #000);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
    animation: fadeIn 1s ease;
}

.win-pearl {
    width: 240px;
    animation: float 3s ease-in-out infinite;
    cursor: pointer;
}

.win-text {
    margin-top: 20px;
    font-size: 28px;
    color: #aef;
    text-shadow: 0 0 15px rgba(0,255,255,0.8);
}

.win-pearl:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 40px rgba(180,255,255,1));
}


@keyframes float {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
