@import url('https://fonts.googleapis.com/css2?family=Signika:wght@300..700&display=swap');

/* ── Global stroke/fill text effect ── */
.text-stroke {
    display: grid;
    place-items: center;
}

.text-stroke .stroke,
.text-stroke .fill {
    grid-area: 1 / 1;
    font-family: "Signika", sans-serif;
    font-weight: 700;
}

.text-stroke .stroke {
    -webkit-text-stroke: 3px #38b6ff;
    color: #38b6ff;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.15));
}

.text-stroke .fill {
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 45%, #c5eaf7 72%, #9ad6ed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

/* Larger stroke for h2 heading */
#login_form h2 .stroke {
    -webkit-text-stroke: 7px #1a8fd1;
    color: #1a8fd1;
}

/* inline-grid for spans inside labels/buttons */
span.text-stroke {
    display: inline-grid;
}

* {
    cursor: none;
}

body {
    overflow-x: hidden;
    font-family: "Signika", sans-serif;
    margin: 0;
    user-select: none;
}

.bubble-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bubble {
    position: absolute;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(25, 49, 207, 0.07);
    border: 1px solid rgba(25, 49, 207, 0.07);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    bottom: -150px;
    box-shadow:
        rgba(0, 0, 0, 0.09) 0 -20px 25px 0 inset,
        rgba(0, 0, 0, 0.09) 0 -40px 30px 0 inset,
        rgba(0, 0, 0, 0.09) 0 2px 1px,
        rgba(0, 0, 0, 0.09) 0 8px 4px,
        rgba(0, 0, 0, 0.09) 0 16px 8px;
    animation: floatUp 14s cubic-bezier(0.6, 0.8, 0.9, 0.35) infinite;
}

.bubble:nth-child(1) {
    left: 10%;
    width: 90px;
    animation-duration: 14s;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    left: 22%;
    width: 60px;
    animation-duration: 20s;
    animation-delay: 3s;
}

.bubble:nth-child(3) {
    left: 35%;
    width: 110px;
    animation-duration: 12s;
    animation-delay: 7s;
}

.bubble:nth-child(4) {
    left: 50%;
    width: 75px;
    animation-duration: 18s;
    animation-delay: 1s;
}

.bubble:nth-child(5) {
    left: 63%;
    width: 50px;
    animation-duration: 16s;
    animation-delay: 9s;
}

.bubble:nth-child(6) {
    left: 74%;
    width: 130px;
    animation-duration: 22s;
    animation-delay: 4s;
}

.bubble:nth-child(7) {
    left: 85%;
    width: 80px;
    animation-duration: 15s;
    animation-delay: 11s;
}

.bubble:nth-child(8) {
    left: 6%;
    width: 55px;
    animation-duration: 24s;
    animation-delay: 15s;
}

.bubble:nth-child(9) {
    left: 92%;
    width: 95px;
    animation-duration: 17s;
    animation-delay: 2s;
}

.bubble:nth-child(10) {
    left: 44%;
    width: 65px;
    animation-duration: 19s;
    animation-delay: 18s;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }

    10% {
        opacity: 0.9;
    }

    90% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-110vh) rotate(12deg);
        opacity: 0;
    }
}

#login_form {
    max-width: 520px;
    margin: 15px auto;
    padding: 0 0 30px 0;
    background: linear-gradient(180deg, #cacaca00 0%, #bbbbbba8 30%, #d4d4d480 60%, #c2c2c28c 100%);
    opacity: 0;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: ux 0.4s ease-in-out forwards;
}

form {
    box-shadow: none;
}

#login_form h2 {
    padding: 20px;
    width: 100%;
    border-radius: 10px 10px 0 0;
    font-size: 32pt;
    text-align: center;
    background-color: #38b6ff;
    margin: 0 0 30px 0;
    box-sizing: border-box;
    font-weight: 800;
    display: grid;
    place-items: center;
    font-family: "Signika", sans-serif;
}

.admin {
    font-size: 16pt;
    text-align: center;
    margin: 5% 0 1% 0;
    font-family: "Signika", sans-serif;
}

.form-group {
    margin-bottom: 25px;
    width: 100%;
    padding: 0 40px;
    box-sizing: border-box;
}

.form-group label {
    font-size: 20pt;
    margin-bottom: 8px;
    display: block;
    font-family: "Signika", sans-serif;
}

input[type=email],
input[type=password] {
    width: 400px;
    padding: 12px 15px;
    border: 1px solid #d5dce2;
    border-radius: 5px;
    font-size: 17pt;
    font-family: "Signika", sans-serif;
    transition: border 0.5s ease-in-out;
}

input[type=email]:hover,
input[type=password]:hover {
    border: 1px solid #aaacaf;
}

input[type=email]:focus,
input[type=password]:focus {
    outline: 2px solid #6b6c6d;
}

img {
    width: 250px;
    margin: 0;
    animation: img-ux 0.99s ease-in-out forwards;
}

.btn-primary {
    background: linear-gradient(180deg, #7fd4ff 0%, #38b6ff 100%);
    letter-spacing: 3px;
    border: none;
    padding: 12px 30px;
    font-size: 23pt;
    border-radius: 5px;
    cursor: none;
    transition: background 0.3s ease-in-out, box-shadow 0.3s ease-in-out, transform 0.25s ease-in-out;
    font-family: "Signika", sans-serif;
    margin: 10px 0 0 150px;
    min-width: 200px;
    box-shadow: 0 4px 0 #1a9de0, inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #a8e4ff 0%, #60c8ff 100%);
    box-shadow: 0 6px 0 #1a9de0, 0 4px 16px rgba(56, 182, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #1a9de0, inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.alert {
    margin: 20px 40px 0 40px;
    padding: 12px 15px;
    border-radius: 5px;
    font-size: 14pt;
    box-sizing: border-box;
    text-align: center;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

hr {
    border: 0;
    border-top: 1px solid #ced4da;
    margin: 30px 0;
}

.fuzzy-overlay {
    position: fixed;
    inset: -200%;
    background-image: url("media/noise.jpg");
    opacity: 10%;
    z-index: 1;
    pointer-events: none;
    animation: shift 0.2s linear infinite both;
}

@keyframes shift {
    0% {
        transform: translateX(10%) translateY(10%);
    }

    100% {
        transform: translateX(-10%) translateY(-10%);
    }
}

@keyframes ux {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes img-ux {
    0% {
        opacity: 0;
        transform: translateY(0);
    }

    50% {
        transform: translateY(9px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px 24px 40px;
    pointer-events: auto;
    position: relative;
    z-index: 999999;
    cursor: none;
}

.native-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 2px solid #aaa;
    border-radius: 4px;
    background: #fff;
    position: relative;
    flex-shrink: 0;
    cursor: none;
    pointer-events: auto;
    z-index: 9999999;
    margin: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.native-checkbox:checked {
    background-color: #38b6ff;
    border-color: #38b6ff;
}

.native-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

.remember-label {
    font-size: 14pt;
    font-family: "Signika", sans-serif;
    pointer-events: auto;
    user-select: none;
    cursor: none;
}

.btn-reset {
    background: linear-gradient(180deg, #7fd4ff 0%, #38b6ff 100%);
    letter-spacing: 3px;
    border: none;
    padding: 12px 30px;
    font-size: 18pt;
    border-radius: 5px;
    cursor: none;
    transition: background 0.3s ease-in-out, box-shadow 0.3s ease-in-out, transform 0.25s ease;
    font-family: "Signika", sans-serif;
    margin: 12px 0 0 0;
    min-width: 200px;
    display: block;
    box-shadow: 0 4px 0 #1a9de0, inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-reset:hover {
    background: linear-gradient(180deg, #a8e4ff 0%, #60c8ff 100%);
    box-shadow: 0 6px 0 #1a9de0, 0 4px 16px rgba(56, 182, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-reset:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #1a9de0, inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.login-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.splash-title {
    font-family: "Signika", sans-serif;
    font-size: 5em;
    letter-spacing: 3px;
    text-align: center;
}

.splash-subtitle {
    font-family: "Signika", sans-serif;
    font-size: 1.2em;
    letter-spacing: 4px;
    margin-top: 12px;
    text-align: center;
}

.splash-bar {
    width: 300px;
    height: 6px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    margin-top: 30px;
    overflow: hidden;
}

.splash-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38b6ff, #60c8ff);
    border-radius: 10px;
    animation: splashLoad 2.1s ease forwards;
}

@keyframes splashLoad {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE @MEDIA BREAKPOINTS
   Redoslijed: od najvećeg prema najmanjem (desktop-down)
   ═══════════════════════════════════════════════════ */
/* ── Iznad 1400px ── */
@media (min-width: 1400px) {
    #login_form {
        max-width: 580px;
        margin: 30px auto;
    }

    #login_form h2 {
        font-size: 36pt;
    }

    input[type=email],
    input[type=password] {
        width: 440px;
        font-size: 18pt;
    }

    .form-group {
        padding: 0 50px;
    }

    .remember-row {
        padding: 16px 50px 24px 50px;
    }

    img {
        width: 280px;
    }

    .btn-primary {
        font-size: 25pt;
        margin-left: 180px;
    }

    .splash-title {
        font-size: 6em;
    }

    .splash-subtitle {
        font-size: 1.4em;
    }
}

/* ── Od 1200px do 1399px ── */
@media (min-width: 1200px) and (max-width: 1399px) {
    #login_form {
        max-width: 540px;
        margin: 20px auto;
    }

    #login_form h2 {
        font-size: 34pt;
    }

    input[type=email],
    input[type=password] {
        width: 420px;
        font-size: 17pt;
    }

    .form-group {
        padding: 0 45px;
    }

    .remember-row {
        padding: 16px 45px 24px 45px;
    }

    img {
        width: 260px;
    }

    .btn-primary {
        font-size: 23pt;
        margin-left: 155px;
    }

    .splash-title {
        font-size: 5.5em;
    }
}

/* ── Od 992px do 1199px ── */
@media (min-width: 992px) and (max-width: 1199px) {
    #login_form {
        max-width: 500px;
        margin: 15px auto;
    }

    #login_form h2 {
        font-size: 30pt;
    }

    input[type=email],
    input[type=password] {
        width: 390px;
        font-size: 16pt;
    }

    .form-group {
        padding: 0 40px;
    }

    .btn-primary {
        font-size: 21pt;
        margin-left: 150px;
    }

    img {
        width: 230px;
    }

    .splash-title {
        font-size: 4.8em;
    }

    .splash-subtitle {
        font-size: 1.15em;
    }
}

/* ── Od 768px do 991px ── */
@media (min-width: 768px) and (max-width: 991px) {
    #login_form {
        max-width: 460px;
        margin: 12px auto;
        padding: 0 0 24px 0;
    }

    #login_form h2 {
        font-size: 26pt;
        padding: 16px;
    }

    .form-group {
        padding: 0 30px;
        margin-bottom: 20px;
        margin-left: 16.5%;
    }

    .form-group label {
        font-size: 17pt;
    }

    input[type=email],
    input[type=password] {
        max-width: 250px;
        font-size: 15pt;
        padding: 10px 13px;
    }

    .remember-row {
        padding: 12px 30px 20px 30px;
        margin-left: 16.5%;
    }

    .remember-label {
        font-size: 13pt;
    }

    img {
        width: 200px;
    }

    .btn-primary {
        margin-right: 150px;
        font-size: 19pt;
        padding: 10px 24px;
    }

    .btn-reset {
        font-size: 15pt;
        padding: 10px 24px;
    }

    .admin {
        font-size: 14pt;
        margin: 4% 20px 1% 20px;
    }

    .alert {
        margin: 16px 30px 0 30px;
        font-size: 13pt;
    }

    .splash-title {
        font-size: 4em;
    }

    .splash-subtitle {
        font-size: 1.1em;
        letter-spacing: 3px;
    }

    .splash-bar {
        width: 260px;
    }
}

/* ── Od 480px do 767px ── */
@media (min-width: 480px) and (max-width: 767px) {
    #login_form {
        max-width: 100%;
        margin: 8px 16px;
        padding: 0 0 20px 0;
        border-radius: 8px;
    }

    #login_form h2 {
        font-size: 22pt;
        padding: 14px;
        border-radius: 8px 8px 0 0;
    }

    .form-group {
        padding: 0 20px;
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 15pt;
        margin-bottom: 6px;
    }

    input[type=email],
    input[type=password] {
        width: 100%;
        font-size: 14pt;
        padding: 10px 12px;
        box-sizing: border-box;
    }

    .remember-row {
        padding: 10px 20px 18px 20px;
        gap: 10px;
    }

    .native-checkbox {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }

    .remember-label {
        font-size: 12pt;
    }

    img {
        width: 170px;
        margin: 0;
    }

    .form-btn {
        display: flex;
        justify-content: center;
    }

    .btn-primary {
        font-size: 17pt;
        padding: 10px 20px;
        margin: 10px 0 0 0;
        min-width: 180px;
        letter-spacing: 2px;
    }

    .btn-reset {
        font-size: 13pt;
        padding: 10px 20px;
        min-width: 180px;
        letter-spacing: 2px;
    }

    .admin {
        font-size: 12pt;
        margin: 4% 16px 1% 16px;
        text-align: center;
    }

    .alert {
        margin: 12px 20px 0 20px;
        font-size: 12pt;
        padding: 10px 12px;
    }

    .splash-title {
        font-size: 3.2em;
        letter-spacing: 2px;
    }

    .splash-subtitle {
        font-size: 1em;
        letter-spacing: 3px;
    }

    .splash-bar {
        width: 220px;
    }
}

/* ── Ispod 479px ── */
@media (max-width: 479px) {
    #login_form {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        height: 96dvh;
        justify-content: flex-start;
        background: linear-gradient(180deg, #cacaca00 0%, #bbbbbba8 30%, #d4d4d480 60%, #c2c2c28c 100%);
    }

    #login_form h2 {
        font-size: 18pt;
        padding: 14px 10px;
        border-radius: 0;
        letter-spacing: 1px;
    }

    /* Larger stroke for h2 at mobile */
    #login_form h2 .stroke {
        -webkit-text-stroke: 5px #1a8fd1;
    }

    .form-group {
        padding: 0 16px;
        margin-bottom: 14px;
    }

    .form-group label {
        font-size: 13pt;
        margin-bottom: 5px;
    }

    input[type=email],
    input[type=password] {
        width: 100%;
        font-size: 13pt;
        padding: 9px 11px;
        box-sizing: border-box;
    }

    .remember-row {
        padding: 8px 16px 16px 16px;
        gap: 8px;
    }

    .native-checkbox {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }

    .native-checkbox:checked::after {
        font-size: 13px;
    }

    .remember-label {
        font-size: 11pt;
    }

    img {
        width: 130px;
        margin: 6px 0;
    }

    .form-btn {
        display: flex;
        justify-content: center;
    }

    .btn-primary {
        font-size: 14pt;
        padding: 9px 18px;
        margin: 8px 0 0 0;
        min-width: 160px;
        letter-spacing: 1px;
        box-shadow: 0 3px 0 #1a9de0, inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }

    .btn-primary:hover {
        box-shadow: 0 5px 0 #1a9de0, 0 3px 12px rgba(56, 182, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }

    .btn-reset {
        font-size: 11pt;
        padding: 9px 18px;
        min-width: 160px;
        letter-spacing: 1px;
        margin: 10px 0 0 0;
        box-shadow: 0 3px 0 #1a9de0, inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }

    .admin {
        font-size: 10pt;
        margin: 6% 14px 2% 14px;
        text-align: center;
    }

    .alert {
        margin: 10px 16px 0 16px;
        font-size: 11pt;
        padding: 9px 11px;
        border-radius: 4px;
    }

    /* Splash screen adjustments */
    .splash-title {
        font-size: 2.8em;
        letter-spacing: 1px;
    }

    .splash-subtitle {
        font-size: 0.85em;
        letter-spacing: 2px;
    }

    .splash-bar {
        width: 180px;
        height: 5px;
        margin-top: 22px;
    }

    /* Bubbles — manje na mobitelu */
    .bubble:nth-child(3),
    .bubble:nth-child(6),
    .bubble:nth-child(9) {
        display: none;
    }
}

/* ── Wii logo "ii" inline-style replacements ── */
.wii-ii-stroke {
    -webkit-text-stroke-color: #2a9fd1;
}

.wii-ii-fill {
    background: linear-gradient(180deg, #c5eaf7, #9ad6ed);
    -webkit-background-clip: text;
    background-clip: text;
}