/* === ОСНОВНІ СТИЛІ === */
:root { 
    --bg-color: #000; 
    --text-color: #fff; 
    --accent-color: #2e8eff; /* Для виділення сьогоднішнього дня */
    --success-color: #2CAD3D; /* Зелений для "Так" */
    --danger-color: #ff6b6b; /* Червоний для "Ні" */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Orbitron', monospace; 
    background: var(--bg-color); 
    color: var(--text-color); 
    overflow-x: hidden; 
}
a { text-decoration: none; }

/* Основний контейнер, який з'являється після прелоадера */
.main-content {
    min-height: 100vh; 
    width: 100%; 
    padding-top: 50px; 
    opacity: 0; 
    transition: opacity 1s ease-in-out; 
    position: relative;
    /* !!! Додаємо фонове зображення для ефекту blur */
    background: url('https://devillusiontraining.pages.dev/background.webp') no-repeat center center fixed; /* ЗАМІНИТИ НА РЕАЛЬНИЙ ШЛЯХ АБО ВИКОРИСТАТИ ГРАДІЄНТ/КОЛІР */
    background-size: cover;
}
.main-content.visible {
    opacity: 1;
}

/* === СТИЛІ НАПИСУ === */
.main-text { 
    position: absolute; top: 2%; left: 50%; 
    transform: translateX(-50%); z-index: 10; 
    text-align: center; color: var(--text-color);
    padding: 0.5rem 1.5rem;
    opacity: 1; 
}
.main-text h1 { 
    font-size: 2rem; font-weight: 700; 
    letter-spacing: 3px; text-transform: uppercase; 
    cursor: pointer; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* === ПРЕЛОАДЕР === */
.ui-abstergo {
  --primary: #fff; --secondary: rgba(255, 255, 255, 0.3);
  --shadow-blur: 3px; --text-shadow-blur: 3px;
  --animation-duration: 2s; --size: 1;
}
.abstergo-loader * { box-sizing: content-box; }
.ui-abstergo {
  display: flex; flex-direction: column; align-items: center;
  row-gap: 30px; scale: var(--size); position: fixed;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s;
  opacity: 1; visibility: visible;
}
.ui-abstergo.hidden { opacity: 0; visibility: hidden; }
.ui-abstergo .ui-text {
  color: var(--primary); text-shadow: 0 0 var(--text-shadow-blur) var(--secondary);
  font-family: Menlo, sans-serif; font-size: 1rem; letter-spacing: 1px;
  display: flex; align-items: baseline; column-gap: 3px;
}
.ui-abstergo .ui-dot {
  content: ""; display: block; width: 3px; height: 3px;
  animation: dots var(--animation-duration) infinite linear;
  background-color: var(--primary);
}
.ui-abstergo .ui-dot:nth-child(2) { animation-delay: 0.8s; }
.ui-abstergo .ui-dot:nth-child(3) { animation-delay: 1.2s; }
.ui-abstergo .ui-dot + .ui-dot { margin-left: 3px; }
.abstergo-loader { width: 103px; height: 90px; position: relative; }
.abstergo-loader div {
  width: 50px; border-right: 12px solid transparent;
  border-left: 12px solid transparent; border-top: 21px solid var(--primary);
  position: absolute; filter: drop-shadow(0 0 var(--shadow-blur) var(--secondary));
}
.abstergo-loader div:nth-child(1) { top: 27px; left: 7px; rotate: -60deg; animation: line1 var(--animation-duration) linear infinite alternate; }
.abstergo-loader div:nth-child(2) { bottom: 2px; left: 0; rotate: 180deg; animation: line2 var(--animation-duration) linear infinite alternate; }
.abstergo-loader div:nth-child(3) { bottom: 16px; right: -9px; rotate: 60deg; animation: line3 var(--animation-duration) linear infinite alternate; }
@keyframes line1 { 0%, 40% { top: 27px; left: 7px; rotate: -60deg; } 60%, 100% { top: 22px; left: 14px; rotate: 60deg; } }
@keyframes line2 { 0%, 40% { bottom: 2px; left: 0; rotate: 180deg; } 60%, 100% { bottom: 5px; left: -8px; rotate: 300deg; } }
@keyframes line3 { 0%, 40% { bottom: 16px; right: -9px; rotate: 60deg; } 60%, 100% { bottom: 7px; right: -11px; rotate: 180deg; } }
@keyframes dots { 0% { background-color: var(--secondary); } 30% { background-color: var(--primary); } 70%, 100% { background-color: var(--secondary); } }


/* === БЛОК ПАРОЛЯ ТА МОДАЛЬНІ ВІКНА === */
.password-prompt {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9000; opacity: 0; visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
}
.password-prompt.visible { opacity: 1; visibility: visible; }

.card {
    width: 380px; background: #262626;
    border-radius: 10px; border: 1px solid #3F3F40;
    padding: 15px 25px; 
    font-family: 'Montserrat', sans-serif;
}
.card header {
    font-size: 1rem; color: #BDBFB7;
    text-align: center; margin-bottom: 20px;
}
.card main {
    display: flex; flex-direction: column;
    align-items: center; gap: 15px; margin-bottom: 20px;
}
/* ... Стилі поля пароля ... */
.passcode-wrapper { display: flex; gap: 10px; }
.passcode-input {
    width: 45px; height: 55px; background: #3F3F40;
    border: 1px solid #555; border-radius: 8px;
    text-align: center; font-size: 2rem; color: var(--text-color);
    font-family: 'Orbitron', monospace;
    caret-color: var(--text-color);
}
#passwordInput {
    position: absolute; opacity: 0;
    width: 1px; height: 1px; caret-color: transparent;
}
.card footer {
    font-size: 0.8rem; color: #ff6b6b; 
    text-align: center; 
    display: none; 
}
.card footer a { color: #74c0fc; text-decoration: underline; }


/* === СТИЛІ МОДАЛЬНОГО ВІКНА ПІДТВЕРДЖЕННЯ (Крок 7) === */
.modal-card {
    width: 320px; 
    background: rgba(38, 38, 38, 0.7); /* !!! translucent glass */
    backdrop-filter: blur(10px); /* !!! translucent glass */
    border: 1px solid rgba(63, 63, 64, 0.5); /* !!! translucent glass */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2); /* Тінь для ефекту */
}
.modal-main {
    justify-content: center;
    padding: 10px 0;
    margin-bottom: 25px;
}
.modal-main .question-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: white;
}
.card .modal-footer {
    display: flex;
    justify-content: space-around;
    padding: 0 10px;
    gap: 15px;
    margin: 0; 
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: background-color 0.2s, box-shadow 0.2s;
    flex-grow: 1;
}

.btn-no {
    background-color: #555;
    color: white;
}
.btn-no:hover {
    background-color: var(--danger-color);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.btn-yes {
    background-color: var(--success-color);
    color: white;
}
.btn-yes:hover {
    background-color: #38c74d;
    box-shadow: 0 0 10px rgba(42, 173, 61, 0.7);
}


/* === КОНТЕЙНЕР ПРОФІЛІВ === */
.profile-container {
    position: absolute; top: 15%; left: 20px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 20px; 
}

/* === ДИЗАЙН ПРОФІЛЮ "nezlobin" === */
.white, .border, .darkBorderBg, .glow {
    max-height: 70px; max-width: 314px;
    height: 100%; width: 100%;
    position: absolute; overflow: hidden;
    z-index: -1; border-radius: 12px;
    filter: blur(3px);
    pointer-events: none; 
}
.input {
    background-color: #010201; border: none; width: 301px; height: 56px;
    border-radius: 10px; color: white; padding-inline: 59px; font-size: 18px;
    display: flex; align-items: center; font-family: 'Montserrat', sans-serif;
    position: relative; 
    z-index: 2; 
}
#poda { 
    display: flex; align-items: center; justify-content: center; cursor: pointer; 
    position: relative; 
    z-index: 10; 
}
#poda:hover > .darkBorderBg::before { transform: translate(-50%, -50%) rotate(-98deg); }
#poda:hover > .glow::before { transform: translate(-50%, -50%) rotate(-120deg); }
#poda:hover > .white::before { transform: translate(-50%, -50%) rotate(-97deg); }
#poda:hover > .border::before { transform: translate(-50%, -50%) rotate(-110deg); }
.glow { overflow: hidden; filter: blur(30px); opacity: 0.4; max-height: 130px; max-width: 354px; }
#main { position: relative; }
#profile-icon {
    position: absolute; left: 20px; top: 15px; width: 24px;
    height: 24px; color: #c0b9c0;
}

/* === ДИЗАЙН КНОПКИ "+" === */
.button {
  --black-700: hsla(0 0% 12% / 1); --border_radius: 9999px; --transtion: 0.3s ease-in-out; --offset: 2px;
  cursor: pointer; position: relative; display: flex; align-items: center; gap: 0.5rem;
  transform-origin: center; padding: 0.8rem 1.5rem; background-color: transparent;
  border: none; border-radius: var(--border_radius); transform: scale(calc(1 + (var(--active, 0) * 0.1)));
  transition: transform var(--transtion); font-family: 'Montserrat', sans-serif; 
}
.button:is(:hover, :focus-visible) { --active: 1; }
.button:active { transform: scale(1); }
.button .sparkle { position: relative; z-index: 10; width: 1.25rem; height: 1.25rem; }
.button .text_button {
  position: relative; z-index: 10;
  background-image: linear-gradient( 90deg, hsla(0 0% 100% / 1) 0%, hsla(0 0% 100% / var(--active, 0)) 120% );
  background-clip: text; font-size: 0.9rem; color: transparent; font-weight: 600;
}
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes path { /* Анімація для іконки */ }

/* === СТИЛІ ДЛЯ КОНТЕНТУ ПІСЛЯ ВХОДУ (Крок 5+) === */
.app-content {
    margin-top: 50px; padding: 20px; display: none; opacity: 0;
    transition: opacity 0.5s ease; display: flex; flex-direction: column;
    align-items: center; gap: 20px; width: 100%;
}
.app-content.visible { display: flex; opacity: 1; }

/* === КНОПКА "ІСТОРІЯ ТРЕНУВАНЬ" (Крок 5) === */
.user-profile {
  width: auto; padding: 0 10px; height: 51px; border-radius: 15px;
  cursor: pointer; transition: 0.3s ease;
  /* !!! ТЕПЕР TRANSLUCENT GLASS */
  background: rgba(46, 142, 255, 0.2);
  backdrop-filter: blur(10px); /* !!! */
  border: 1px solid rgba(46, 142, 255, 0.4); /* !!! */
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); /* Тінь */
  display: flex;
  align-items: center; justify-content: center; 
}
.user-profile:hover, .user-profile:focus {
  background-color: rgba(46, 142, 255, 0.7); /* При наведенні залишаємо синій фон, але без blur */
  box-shadow: 0 0 10px rgba(46, 142, 255, 0.5); outline: none;
}
.user-profile-inner {
  height: 47px; border-radius: 13px; background-color: transparent; /* !!! Прозорий фон */
  display: flex; align-items: center; justify-content: center; gap: 10px; 
  color: #fff; font-weight: 600; font-family: 'Montserrat', sans-serif;
  padding: 0 15px; white-space: nowrap;
}
.user-profile-inner svg { width: 24px; height: 24px; stroke: #fff; }


/* === КАЛЕНДАР (Крок 6) === */
.calendar-card {
    width: 350px; 
    /* !!! ТЕПЕР TRANSLUCENT GLASS */
    background: rgba(38, 38, 38, 0.7); /* Прозорий фон */
    backdrop-filter: blur(10px); /* Розмиття фону */
    border-radius: 10px;
    border: 1px solid rgba(63, 63, 64, 0.5); /* Напівпрозорий бордюр */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2); /* Тінь */
    margin-top: 10px;
}
.calendar-card header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 20px; color: #BDBFB7; font-size: 1.1rem;
    text-transform: uppercase; font-weight: 600;
}
.calendar-card header a {
    font-size: 1.5rem; cursor: pointer; color: #BDBFB7;
    text-decoration: none; transition: color 0.2s;
}
.calendar-card header a:hover { color: var(--accent-color); }
.calendar-card main {
    padding: 0 10px; display: flex; flex-direction: column; align-items: center;
}
.calendar-card .weekdays {
    display: grid; grid-template-columns: repeat(7, 1fr); width: 100%;
    text-align: center; color: #BDBFB7; font-weight: 400; font-size: 0.8rem;
    padding-bottom: 5px;
}
.calendar-card .days-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); width: 100%;
    gap: 2px; padding-bottom: 15px;
}
.calendar-card .day-cell {
    display: flex; align-items: center; justify-content: center;
    height: 40px; font-size: 1rem; color: white; cursor: pointer;
    border-radius: 50%; transition: background-color 0.2s, color 0.2s;
    font-family: 'Montserrat', sans-serif;
}
.calendar-card .day-cell:hover { background-color: rgba(63, 63, 64, 0.5); /* Напівпрозорий ховер */ }
.calendar-card .day-cell.inactive { color: #555; pointer-events: none; }
.calendar-card .day-cell.today {
    background-color: var(--accent-color); color: white; font-weight: 700;
    box-shadow: 0 0 8px rgba(46, 142, 255, 0.5); border-radius: 50%;
}
.calendar-card .day-cell.selected {
    background-color: #2CAD3D; color: white; font-weight: 700; border-radius: 50%;
}
.calendar-card footer {
    display: flex; align-items: center; justify-content: center;
    padding: 15px 20px; font-size: 0.9rem; gap: 5px; border-top: 1px solid rgba(63, 63, 64, 0.5); /* Напівпрозорий роздільник */
}
.calendar-card footer p { font-family: 'Montserrat', sans-serif; }
.calendar-card footer #todayDateDisplay { color: var(--text-color); font-weight: 600; }
