@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* ДОБАВИТЬ В НАЧАЛО ФАЙЛА - WebView оптимизация */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    box-sizing: border-box;
}

/* Улучшение скролла для WebView */
html {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;

    /* Правильный порядок: сначала fallback, потом картинка */
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); /* fallback для WebView */
    background-image: url("/static/Loginity/images/FastbotImage.68aac093f738.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    /* Предотвращение bounce-эффекта на iOS WebView */
    overscroll-behavior: none;
}

@media (orientation: portrait) {
    body {
        background-size: auto 100%;
        background-position: center;
    }
}

@media (orientation: landscape) {
    body {
        background-size: 100% auto;
        background-position: center;
    }
}

.profile-container {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 600px;
    margin-bottom: 20px;
}

.profile-title {
    color: #ffa500;
    font-size: 32px;
    margin-bottom: 20px;
}

.user-info {
    margin-bottom: 30px;
}

.username {
    color: #008b8b;
    font-size: 30px;
    margin-bottom: 10px;
}

.age,
.gender {
    color: #6a5acd;
    font-size: 18px;
}

.actions-title {
    color: #ff6347;
    font-size: 24px;
    margin-bottom: 10px;
}

.actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* ОБНОВИТЬ .action-link для лучшего touch-интерфейса */
.action-link {
    background-color: #8157de;
    color: white;
    padding: 12px 20px; /* Увеличено для touch */
    text-decoration: none;
    border-radius: 8px; /* Увеличено для лучшего вида */
    margin: 5px;
    font-size: 16px;
    transition: all 0.3s ease-in-out;

    /* Улучшения для touch-интерфейса */
    min-height: 44px; /* Apple рекомендует минимум 44px */
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    /* Предотвращение выделения текста */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.action-link:hover,
.action-link:active {
    background-color: #ff1493;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Добавить активное состояние для touch */
.action-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.new-match {
    background-color: #90ee90;
    padding: 10px;
    border-radius: 5px;
    max-width: 600px;
    margin-top: 120px;
}

.match-title {
    color: #008000;
    font-size: 20px;
    margin-bottom: 5px;
}

.match-message {
    color: #006400;
    font-size: 16px;
}

.phone {
    color: #7FFF00;
    font-size: 24px;
    margin-bottom: 5px;
}

.hobby {
    color: #008b8b;
    font-size: 24px;
    margin-bottom: 5px;
}

.city {
    color: #6a5acd;
    font-size: 24px;
    margin-bottom: 5px;
}

.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-form .form-group {
    margin-bottom: 10px;
    width: 100%;
    max-width: 300px;
}

/* ОБНОВИТЬ form-control для лучшего touch-интерфейса */
.login-form .form-control {
    width: 100%;
    padding: 12px; /* Увеличено для touch */
    border-radius: 8px;
    border: 2px solid #ccc; /* Увеличена толщина для лучшей видимости */
    font-size: 16px; /* Предотвращает zoom на iOS */
    min-height: 44px; /* Минимальная высота для touch */
}

.login-form .form-control:focus {
    outline: none;
    border-color: #8157de;
    box-shadow: 0 0 0 3px rgba(129, 87, 222, 0.1);
}

.auth-link {
    margin-top: 20px;
    text-align: center;
}

.auth-link a {
    color: #ffffff;
    text-decoration: none;
    padding: 8px; /* Увеличена область касания */
    display: inline-block;
}

.auth-link a:hover {
    text-decoration: underline;
}

.action-link2 {
    background-color: #d13f2c;
    color: white;
    padding: 12px 20px; /* Увеличено для touch */
    text-decoration: none;
    border-radius: 8px;
    margin: 5px;
    font-size: 16px;
    transition: background-color 0.3s ease;
    min-height: 44px; /* Добавлено для touch */
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-link2:hover {
    background-color: #58d12c;
}

.notification {
    position: relative;
    display: inline-block;
}

.notification-icon {
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 8px; /* Увеличена область касания */
}

.notification-popup {
    display: none;
    position: absolute;
    z-index: 1;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Изменить hover на touch-события для мобильных */
@media (hover: hover) {
    .notification:hover .notification-popup {
        display: block;
    }
}

@media (hover: none) {
    .notification:active .notification-popup {
        display: block;
    }
}

/* About page styles */
.about-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    margin: 60px auto 20px auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow-y: visible;
}

.about-title {
    color: #8157de;
    font-size: 32px;
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #ffa500;
    padding-bottom: 10px;
}

.about-intro {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #444;
}

.about-section {
    margin-bottom: 25px;
}

.about-section h2 {
    color: #ff6347;
    font-size: 22px;
    margin-bottom: 12px;
    border-left: 4px solid #8157de;
    padding-left: 10px;
}

.about-section p {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 12px;
}

.about-section ul {
    list-style-type: none;
    padding-left: 5px;
}

.about-section li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 20px;
}

.about-section li:before {
    content: "•";
    color: #8157de;
    font-size: 20px;
    position: absolute;
    left: 0;
    top: -3px;
}

.about-section strong {
    color: #008b8b;
    font-weight: bold;
}

.about-cta {
    font-size: 18px;
    color: #ff1493;
    text-align: center;
    font-weight: bold;
    margin: 25px 0;
}

.about-section a {
    color: #2abd1c;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    padding: 4px; /* Увеличена область касания */
}

.about-section a:hover {
    color: #ff1493;
    text-decoration: underline;
}

.back-to-profile {
    text-align: center;
    margin-top: 25px;
}

/* Стили для боковой навигации */
.side-nav-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* ОБНОВИТЬ .side-nav-link для touch-интерфейса */
.side-nav-link {
    background-color: #8157de;
    color: white;
    padding: 12px 15px; /* Увеличено */
    text-decoration: none;
    border-radius: 8px; /* Увеличено */
    font-size: 16px;
    transition: all 0.3s ease-in-out;
    text-align: center;
    min-width: 120px;
    min-height: 44px; /* Добавлено для touch */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;

    /* Предотвращение выделения текста */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.side-nav-link:hover {
    background-color: #ff1493;
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.side-nav-link:active {
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.about-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    margin: 20px auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    height: auto;
    overflow-y: auto;
    max-height: 85vh;
}

/* ИСПРАВЛЕННЫЕ медиа-запросы для мобильных устройств */
@media (max-width: 768px) {
    .about-container {
        padding: 15px;
        margin: 20px 10px 100px 10px; /* Увеличен нижний отступ */
        border-radius: 10px;
        max-height: 70vh;
    }

    .about-title {
        font-size: 24px;
    }

    .about-intro {
        font-size: 16px;
    }

    .about-section h2 {
        font-size: 18px;
    }

    .about-section p, .about-section li {
        font-size: 14px;
    }

    .about-cta {
        font-size: 16px;
    }

    /* Основная навигация - НЕ фиксированная */
    .side-nav-container {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        margin-bottom: 20px;
        position: static; /* Убираем фиксированное позиционирование */
        transform: none; /* Убираем трансформацию */
        gap: 8px;
    }

    .side-nav-link {
        padding: 8px 12px;
        font-size: 14px;
        min-width: auto;
        min-height: 40px;
        flex: 1 1 auto; /* Позволяем кнопкам растягиваться */
        max-width: 140px; /* Ограничиваем максимальную ширину */
    }

    .side-nav-link:hover {
        transform: translateY(-2px); /* Уменьшили эффект */
    }

    .side-nav-link:active {
        transform: translateY(0);
    }

    /* Убираем лишние отступы */
    .profile-container {
        margin-bottom: 20px; /* Вернули обычный отступ */
        padding: 15px;
        max-width: 95%; /* Немного уже для мобильных */
    }

    /* Кнопки действий тоже оптимизируем */
    .actions {
        gap: 8px;
    }

    .action-link {
        padding: 10px 15px;
        font-size: 14px;
        min-height: 40px;
        flex: 1 1 auto;
        max-width: 160px;
    }

    /* Заголовки меньше */
    .profile-title {
        font-size: 24px;
    }

    .username {
        font-size: 22px;
    }

    .actions-title {
        font-size: 18px;
    }
}