/* ========== ОСНОВНЫЕ НАСТРОЙКИ ========== */
:root {
    --primary-color: #ff4081;
    --primary-dark: #f50057;
    --secondary-color: #7b1fa2;
    --dark-bg: #121212;
    --dark-card: #1e1e1e;
    --dark-border: #333;
    --text-primary: #fff;
    --text-secondary: #aaa;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Roboto", sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== МОДАЛКИ ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background-color: var(--dark-card);
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--dark-border);
}

.age-modal {
    text-align: center;
}

.age-modal h2 {
    color: var(--warning);
    margin-bottom: 1rem;
}

.age-modal p {
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.upgrade-modal {
    max-width: 800px;
}

.upgrade-options {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.upgrade-option {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--dark-border);
    position: relative;
}

.upgrade-option.recommended {
    border-color: var(--primary-color);
    background: rgba(255, 64, 129, 0.1);
}

.recommended-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.upgrade-option h3 {
    margin-bottom: 1rem;
}

.price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

.features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.features li {
    padding: 0.3rem 0;
    color: var(--text-secondary);
}

.features i {
    color: var(--success);
    margin-right: 0.5rem;
}

.one-time-purchases {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--dark-border);
}

.one-time-options {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.payment-modal {
    width: 600px;
    height: 500px;
    display: flex;
    flex-direction: column;
}

#paymentFrame {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.photo-modal {
    max-width: 90vw;
    max-height: 90vh;
}

.photo-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--dark-border);
}

.image-container {
    max-height: 70vh;
    overflow: auto;
    margin-bottom: 1rem;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 5px;
}

.image-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ========== ШАПКА ========== */
.navbar {
    background-color: var(--dark-card);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--dark-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(255, 64, 129, 0.1);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ========== ОСНОВНОЙ КОНТЕНТ ========== */
.content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section {
    display: none;
}

/* ========== АВТОРИЗАЦИЯ ========== */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    background-color: var(--dark-card);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--dark-border);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-input {
    padding: 0.8rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--dark-border);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-select {
    padding: 0.8rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--dark-border);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
}

/* ========== СПИСОК ДЕВУШЕК ========== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tariff-badge {
    background: var(--dark-border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filters .form-input {
    flex: 1;
}

.girls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.girl-card {
    background-color: var(--dark-card);
    border-radius: 10px;
    overflow: hidden;
    transition:
        transform 0.3s,
        box-shadow 0.3s;
    cursor: pointer;
}

.girl-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.girl-avatar {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.girl-info {
    padding: 1rem;
}

.girl-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.girl-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    height: 40px;
    overflow: hidden;
}

.girl-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.status.online {
    background-color: var(--success);
}

.status.offline {
    background-color: var(--danger);
}

/* ========== ЧАТ ========== */
.chat-container {
    display: flex;
    height: calc(100vh - 200px);
    gap: 1rem;
}

.conversations-sidebar {
    width: 300px;
    background-color: var(--dark-card);
    border-radius: 10px;
    padding: 1rem;
    overflow-y: auto;
}

.conversations-list {
    margin-top: 1rem;
}

.conversation-item {
    padding: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.conversation-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.conversation-item.active {
    background-color: rgba(255, 64, 129, 0.2);
    border-left: 3px solid var(--primary-color);
}

.conversation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--dark-card);
    border-radius: 10px;
    overflow: hidden;
}

.chat-header {
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--dark-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

#chatGirlInfo {
    display: flex;
    align-items: center;
}

.chat-actions {
    display: flex;
    gap: 0.5rem;
}

.messages-container {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 70%;
    padding: 0.8rem 1rem;
    border-radius: 15px;
    position: relative;
}

.message.user {
    align-self: flex-end;
    background-color: var(--primary-color);
    border-bottom-right-radius: 5px;
}

.message.ai {
    align-self: flex-start;
    background-color: var(--secondary-color);
    border-bottom-left-radius: 5px;
}

.message-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
    text-align: right;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid var(--dark-border);
    display: flex;
    gap: 1rem;
}

.chat-input-container textarea {
    flex: 1;
    padding: 0.8rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--dark-border);
    border-radius: 5px;
    color: var(--text-primary);
    resize: none;
    font-family: inherit;
}

.message-counter {
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ========== ПРОФИЛЬ ========== */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.profile-avatar {
    font-size: 5rem;
    color: var(--primary-color);
}

.profile-info {
    flex: 1;
}

.profile-tariff {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.badge {
    background: var(--dark-border);
    color: var(--text-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background-color: var(--dark-card);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.profile-limits {
    background-color: var(--dark-card);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.limit-card {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 10px;
    background: var(--dark-border);
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--secondary-color)
    );
    border-radius: 5px;
    transition: width 0.3s;
}

.photo-progress-bar {
    height: 8px;
    background: var(--dark-border);
    border-radius: 4px;
    overflow: hidden;
    margin: 5px 0;
}

.photo-progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 4px;
    transition: width 0.3s;
}

.photo-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.limit-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tariffs-section {
    margin-top: 3rem;
}

.tariffs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.tariff-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--dark-border);
    transition: all 0.3s;
}

.tariff-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.tariff-card h4 {
    margin-bottom: 1rem;
}

.tariff-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

.tariff-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.tariff-features li {
    padding: 0.3rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tariff-features li:last-child {
    border-bottom: none;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ========== КНОПКИ ========== */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-text {
    background: none;
    color: var(--text-secondary);
    padding: 0.5rem;
}

.btn-text:hover {
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover {
    background-color: inherit;
}

/* ========== ЗАГРУЗКА ========== */
.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--dark-border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .content {
        padding: 1rem;
    }

    .chat-container {
        flex-direction: column;
        height: auto;
    }

    .conversations-sidebar {
        width: 100%;
        height: 200px;
    }

    .upgrade-options {
        flex-direction: column;
    }

    .one-time-options {
        flex-direction: column;
    }

    .girls-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        flex-direction: column;
    }
}

/* ========== УВЕДОМЛЕНИЯ ========== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.notification.success {
    background-color: var(--success);
    border-left: 5px solid darkgreen;
}

.notification.error {
    background-color: var(--danger);
    border-left: 5px solid darkred;
}

.notification.info {
    background-color: var(--secondary-color);
    border-left: 5px solid var(--primary-color);
}

.notification.warning {
    background-color: var(--warning);
    border-left: 5px solid darkorange;
}

.notification i {
    font-size: 1.2rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
