/* Загальні налаштування */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0f0f, #1a1a1a, #2c2c2c);
    color: #fff;
}

/* Обгортка сторінки */
.page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 30px;
}

/* Основний контейнер */
.container {
    background: rgba(20, 20, 20, 0.9);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0,0,0,0.6);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

/* Заголовки */
h1 {
    margin-bottom: 25px;
    font-size: clamp(20px, 5vw, 28px);
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Поля вводу та кнопки */
input[type="email"] {
    width: 100%;
    padding: 14px;
    margin-bottom: 18px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    background: #f9f9f9;
    color: #111;
}

button {
    width: 100%;
    padding: 14px;
    margin-bottom: 18px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    color: #fff;
    transition: 0.3s;
}

button:hover {
    background: linear-gradient(45deg, #ff4b2b, #ff416c);
}

.add-energy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px; /* відстань між іконкою і текстом */
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background-color: #ffcc00;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.add-energy-btn:hover {
  background-color: #ffdb4d;
}

.add-energy-btn img.balance-icon {
  width: 20px;
  height: 20px;
}


/* Помилки */
.error {
    color: #ff6b6b;
    margin-top: 10px;
}

/* Адаптив */
@media (max-width: 360px) {
    .container {
        padding: 20px;
    }
    input[type="email"], button {
        font-size: 14px;
        padding: 12px;
    }
}

/* Нижнє меню */
.bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(20,20,20,0.95);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
    z-index: 1000;
}

.bottom-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s;
}

.bottom-menu a:hover,
.bottom-menu a.active {
    color: #ff4b2b;
}

/* Список рефералів */
.referral-list {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.referral-card {
    background: rgba(30,30,30,0.9);
    padding: 12px 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.referral-card strong {
    color: #ff4b2b;
}

/* Мова */
.language-menu {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2000;
}

.flag-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    overflow: hidden;
    cursor: pointer;
    display: inline-block;
}

.flag-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-flags {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    background: rgba(20,20,20,0.95);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.6);
    padding: 10px;
}

.dropdown-flags a {
    display: block;
    margin: 5px 0;
}

.dropdown-flags img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #fff;
    transition: 0.2s;
}

.dropdown-flags img:hover {
    transform: scale(1.1);
    border-color: #ff4b2b;
}

.show {
    display: block;
}

/* Верхній бар користувача */
.user-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 15px;
}

.profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: 0.3s;
}

.profile-btn:hover {
    transform: scale(1.05);
}

/* Баланси */
.balance-box {
    background: rgba(20, 20, 20, 0.9);
    color: #fff;
    text-align: center;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    margin: 10px 0;
}

.balance-icon {
    width: 24px;
    height: 24px;
}

/* Профіль */
.profile-card {
    max-width: 400px;
    margin: 50px auto;
    background: rgba(20, 20, 20, 0.9);
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-card h2 {
    margin-bottom: 15px;
}

/* Кнопки в профілі */
.withdraw-btn {
    margin-top: 10px;
    display: inline-block;
    background: #0088cc;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
}

.withdraw-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Форма email */
.email-form input {
    padding: 8px;
    width: 80%;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 10px;
}

.email-form button {
    background: #4CAF50;
    color: white;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.logout-container {
    margin-top: 20px;
    text-align: center;
}

.logout-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #e74c3c;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.logout-btn:hover {
    background-color: #c0392b;
}

        .info-container {
            background: rgba(20, 20, 20, 0.9);
            border-radius: 14px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.6);
            padding: 20px;
            margin: 20px;
            line-height: 1.6;
            color: #fff;
        }
        .info-container h1 {
            text-align: center;
            margin-bottom: 15px;
            font-size: 1.8em;
            color: #fff;
        }
        .info-container p {
            margin-bottom: 12px;
        }
        .info-container strong {
            color: #0078ff;
        }

        .styled-select {
            width: 100%;
            max-width: 400px;
            padding: 10px 15px;
            font-size: 16px;
            border-radius: 12px;
            border: 2px solid #4CAF50;
            background-color: #f9f9f9;
            color: #333;
            appearance: none; /* прибираємо стандартний стрілочний стиль */
            -webkit-appearance: none;
            -moz-appearance: none;
            cursor: pointer;
        }

        .styled-select:focus {
            outline: none;
            border-color: #2196F3;
            box-shadow: 0 0 5px rgba(33, 150, 243, 0.5);
        }
