@font-face {
    font-family: "Crete Round";
    src: url("/static/fonts/crete-round/CreteRound-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Crete Round";
    src: url("/static/fonts/crete-round/CreteRound-Italic.ttf") format("truetype");
    font-weight: normal;
    font-style: italic;
}

body {
    margin: 0;
    font-family: "Crete Round", serif;
    position: relative; 
    min-height: 100vh;
    overflow-x: hidden;
    background-color: black;
    color: white;
    overflow-wrap: break-word;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/static/images/background.jpg") center/cover no-repeat;
  filter: blur(8px) brightness(50%);
  z-index: -1; 
}

nav {
    display: flex;
    align-items: center;
    height: 60px;
    width: 100%;
    font-size: 20px;
    background-color: black;
    color: white;
}

.navbar-option {
    display: flex;
    height: 30px;
    margin-top: 0px;
    margin-left: 20px;
    /* background-color: green; */
    align-items: center;
    padding: 2px 3px;
    color: white;
    text-decoration: none;
}

.navbar-option:hover {
    color: rgb(1, 177, 1)
}

.nav-right-con {
    margin-left: auto;
    display: inline-flex;
    margin-right: 20px;
}

.index-body {
    padding-top: 20px;
    text-align: center;
}

.index-title {
    font-size: 55px;
}

.index-hint {
    font-size: 20px;
    margin-bottom: 40px;
}

.index-star-hint {
    font-size: 20px;
    width: 25%;
    margin: auto;
    min-width: 300px;
}

.index-form {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.index-input-field {
    display: none;
}

.index-custom-file-upload {
    margin-right: 10px;
    justify-content: center;
    display: flex;
    color: black;
    font-size: 35px;
    background-color: white;
    border: 1px solid black;
    border-radius: 5px;
    width: 200px;
    height: 50px;
    align-items: center;
}

.index-input-button {
    padding: 0;
    font-family: "Crete Round", serif;
    margin-left: 10px;
    justify-content: center;
    display: flex;
    color: black;
    font-size: 35px;
    background-color: white;
    border: 1px solid black;
    border-radius: 5px;
    width: 202px;
    height: 52px;
    align-items: center;
}

.guide-paragraph {
    margin: auto;
    margin-bottom: 20px;
    width: 25%;
    min-width: 500px;
    font-size: 20px;
}

.guide-title {
    font-size: 40px;
    margin-top: 15px;
}

.login-content {
    text-align: center;
    display: flexbox;
    height: 80hv;
}

.login-cred-line {
    font-size: 25px;
}

.login-form {
    display: grid;
    grid-template-columns: 150px 1fr; 
    gap: 25px 20px;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 15px;
}

.login-form-up {
  width: 550px;   /* зробить форму ширшою */
  margin: 0 auto; /* щоб вона залишалася по центру */
}

.login-row {
    display: contents;
}

.login-form label {
    font-size: 22px;
    font-weight: bold;
    color: white;
    text-align: right;
}

.login-form input[type="email"],
.login-form input[type="password"],
.login-form input[type="text"] {
    padding: 10px;
    font-size: 18px;
    border-radius: 5px;
    border: none;
    width: 80%;
    font-family: "Crete Round", serif;
}

.login-cred-line>input {
    color: red;
}

.login-submit {
    padding: 0;
    font-family: "Crete Round", serif;
    margin-left: 10px;
    justify-content: center;
    /* display: flex; */
    color: black;
    font-size: 35px;
    background-color: white;
    border: 1px solid black;
    border-radius: 5px;
    width: 202px;
    height: 52px;
    align-items: center;
    margin: auto;
    margin-top: 15px;
}

.login-wrapper {
  margin: 0;
  height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.register-hint {
    font-size: 20px;
    margin-bottom: 35px;
}

.register-form {
    display: grid;
    grid-template-columns: 250px 1fr; 
    gap: 25px 20px;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.register-content {
  margin: 0;
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.register-form input[type="email"],
.register-form input[type="password"],
.register-form input[type="text"] {
    padding: 10px;
    font-size: 18px;
    border-radius: 5px;
    border: none;
    width: 90%;
    font-family: "Crete Round", serif;
}

.register-form label {
    font-size: 22px;
    font-weight: bold;
    color: white;
    text-align: right;
}

.register-form-up {
  width: 650px;
  margin: 0 auto;
}

.detail-content-box {
    text-align: center;
    width: 50%;
    min-width: 770px;
    max-width: 900px;
    margin: auto;
}

.detail-char-box {
    text-align: left;
    font-size: 20px;
}

.detail-char-box > p {
    margin-bottom: 10px;
    margin-top: 10px;
    overflow-wrap: break-word;
}

.detail-link-box {
    position: relative;
    background-color: rgba(255,255,255,0.15);
    border-radius: 20px;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 30px;
    padding-right: 20px;
    text-align: left;
    margin-bottom: 15px;
}

.detail-link-box > p {
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 18px;
}

.block-type-link > p, .block-type-attachment > p {
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 18px;
}

.detail-decoration {
    left: 0px;
    top: 0px;
    position: absolute;
    background-color: grey;
    border-radius: 20px 0px 0px 20px;
    height: 100%;
    width: 20px
}

.detail-hint {
    font-size: 20px;
}

.message.error {
  color: red;
}

.profile-content {
    text-align: center;
    width: 40%;
    min-width: 470px;
    max-width: 900px;
    margin: auto;
}

.profile-emailblock {
    font-size: 20px;
    position: relative;
    background-color: rgba(255,255,255,0.15);
    border-radius: 20px;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 30px;
    text-align: left;
    margin-bottom: 15px;
}

.profile-emailblock > p {
    margin: 10px;
}

.profile-decoration {
    left: 0px;
    top: 0px;
    position: absolute;
    background-color: grey;
    border-radius: 20px 0px 0px 20px;
    height: 100%;
    width: 20px
}

.profile-historyblock > a {
    border-radius: 20px;
    display: block;
    text-decoration: none;
    color: white;
}

.profile-historyblock > a:hover {
    background-color: rgba(255,255,255,0.2);
}

.small-block-link-wrapper {
    border-radius: 20px;
    display: block;
    text-decoration: none;
    color: white;
}

.small-block-link-wrapper:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Контейнер пагінації */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;

    margin-top: 25px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Кнопки сторінок */
.page-btn {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;

    min-width: 38px;
    height: 38px;
    padding: 0 10px;

    border-radius: 12px;
    text-decoration: none;

    color: white;
    font-size: 14px;
    font-weight: 500;

    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);

    cursor: pointer;
}

/* hover ефект */
.page-btn:hover, .page-btn-active {
    background-color: rgba(255, 255, 255, 0.18);
}

.copy-decorator {
    height: 16px;
    margin-left: 5px;
    margin-bottom: 2px;
}

.copy-popup {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background-color: rgba(30, 30, 30, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition:
        opacity 1s ease,
        transform 0.25s ease;
    z-index: 9999;
    pointer-events: none;
}

.copy-popup.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.spoiler-text {
    display: inline-block;
    min-height: 20px;
    padding: 6px 12px;
    position: relative;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
    line-height: 20px;
    margin-bottom: 4px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.spoiler-text::before {
    content: "*click*";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(120,120,120);
    color: white;
    transition: opacity 0.2s ease;
    border-radius: inherit;
}

.spoiler-text.revealed::before {
    opacity: 0;
    pointer-events: none;
}

.delete-email-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    z-index: 100;
    cursor: pointer;
    opacity: 0.7;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.delete-email-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.delete-popup-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.delete-popup {
    background-color: rgba(40,40,40,0.98);
    color: white;
    padding: 30px;
    border-radius: 20px;
    min-width: 350px;
    text-align: center;
}

.delete-popup-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.popup-btn {
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    color: white;
    background-color: rgba(255,255,255,0.15);
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.popup-btn:hover {
    background-color: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

.confirm-btn:hover {
    background-color: rgba(255,0,0,0.4);
}

/* .lang-selection-form {
} */

.lang-selection-form-select {
    font-size: 20px;
    background-color: black;
    color: white;
    border-radius: 7px;
}

.copy-email-address {
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.2s ease;
    text-decoration: underline;
}

.copy-email-address:hover {
    opacity: 0.7;
}

/* =========================
   TABLETS
   ========================= */
@media (max-width: 1024px) {

    body {
        font-size: 18px;
    }

    .index-title {
        font-size: 42px;
    }

    .guide-title {
        font-size: 34px;
    }

    .guide-paragraph,
    .index-star-hint {
        width: 75%;
        min-width: unset;
        font-size: 20px;
    }

    .detail-content-box,
    .profile-content {
        width: 85%;
        min-width: unset;
    }

    .login-form-up,
    .register-form-up {
        width: 90%;
    }

    .login-form,
    .register-form {
        width: 100%;
    }

    .detail-link-box > p,
    .block-type-link > p,
    .block-type-attachment > p,
    .detail-char-box {
        font-size: 18px;
    }
}


/* =========================
   PHONES
   ========================= */
@media (max-width: 768px) {

    body {
        font-size: 37px;
    }

    nav {
        height: auto;
        min-height: 55px;
        padding: 10px 0;
        flex-wrap: wrap;
        font-size: 18px;
    }

    .navbar-option {
        margin-left: 7px;
        margin-right: 7px;
    }

    .nav-right-con {
        margin-right: 0px;
    }

    .index-body {
        padding: 15px;
    }

    .index-title {
        font-size: 34px;
        line-height: 1.15;
    }

    .index-hint,
    .index-star-hint {
        font-size: 18px;
        width: 90%;
        min-width: unset;
    }

    .guide-title {
        font-size: 30px;
    }

    .guide-paragraph {
        width: 92%;
        min-width: unset;
        font-size: 18px;
    }

    .index-form {
        flex-direction: column;
        gap: 15px;
    }

    .index-custom-file-upload,
    .index-input-button {
        width: 90%;
        max-width: 320px;
        margin: 0;
        font-size: 28px;
    }

    .login-wrapper,
    .register-content {
        height: auto;
        padding: 30px 0;
    }

    .login-form,
    .register-form {
        display: flex;
        flex-direction: column;
        gap: 14px;
        width: 92%;
    }

    .login-form label,
    .register-form label {
        text-align: left;
        font-size: 20px;
        width: 100%;
    }

    .login-form input[type="email"],
    .login-form input[type="password"],
    .login-form input[type="text"],
    .register-form input[type="email"],
    .register-form input[type="password"],
    .register-form input[type="text"] {
        width: 100%;
        box-sizing: border-box;
        font-size: 18px;
    }

    .login-submit {
        width: 100%;
        max-width: 320px;
        font-size: 28px;
    }

    .detail-content-box,
    .profile-content {
        width: 94%;
        min-width: unset;
    }

    .detail-char-box,
    .detail-link-box > p,
    .block-type-link > p,
    .block-type-attachment > p,
    .profile-emailblock {
        font-size: 16px;
    }

    .detail-link-box,
    .profile-emailblock {
        padding-right: 15px;
    }

    .delete-popup {
        min-width: unset;
        width: 75%;
        padding: 22px;
        font-size: 20px;
    }

    .popup-btn {
        font-size: 15px;
        padding: 10px 16px;
    }

    .pagination {
        gap: 6px;
    }

    .page-btn,
    .pagination-btn {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .copy-popup {
        width: 80%;
        text-align: center;
    }

    .detail-header {
        font-size: 28px;
    }

    .message {
        font-size: 20px;
    }
}


/* =========================
   SMALL PHONES
   ========================= */
@media (max-width: 375px) {

    .index-title {
        font-size: 28px;
    }

    .guide-title {
        font-size: 24px;
    }

    .guide-paragraph,
    .index-hint,
    .index-star-hint {
        font-size: 16px;
    }

    .index-custom-file-upload,
    .index-input-button,
    .login-submit {
        height: 48px;
        font-size: 22px;
    }

    .profile-emailblock {
        font-size: 15px;
    }

    .detail-char-box {
        font-size: 15px;
    }

    .delete-email-btn {
        width: 18px;
        height: 18px;
    }

    .spoiler-text {
        max-width: 180px;
    }

    .navbar-option {
        margin-left: 2px;
        margin-right: 2px;
    }

    nav {
        font-size: 16px;
    }

    .lang-selection-form-select {
        font-size: 15px;
    }
}