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

:root {
    --primary: #e91e63;
    --primary-dark: #c2185b;
    --secondary: #9c27b0;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #e0e0e0;
    --success: #4caf50;
    --danger: #f44336;
    --info: #2196f3;
    --male: #2196f3;
    --female: #e91e63;
    --online: #4caf50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    direction: rtl;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Navbar */
.navbar {
    background: var(--primary);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 15px;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.2);
}

.btn-login {
    background: rgba(255,255,255,0.2) !important;
}

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

.btn-logout {
    background: rgba(0,0,0,0.2) !important;
}

.badge {
    background: var(--danger);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-right: 5px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
.main-content {
    padding: 20px 15px;
    min-height: calc(100vh - 150px);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-align: center;
    padding: 60px 20px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.hero-buttons {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s;
    text-align: center;
}

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

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

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

.btn-secondary:hover {
    background: #7b1fa2;
}

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

.btn-danger:hover {
    background: #d32f2f;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

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

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

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

.stat-card.male i { color: var(--male); }
.stat-card.female i { color: var(--female); }
.stat-card.online i { color: var(--online); }

/* Members Grid */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.member-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

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

.member-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.online-dot {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 15px;
    height: 15px;
    background: var(--online);
    border-radius: 50%;
    border: 2px solid white;
}

.online-dot.large {
    width: 20px;
    height: 20px;
}

.online-dot.small {
    width: 10px;
    height: 10px;
}

.member-card h3 {
    margin-bottom: 5px;
}

.member-card h3 a {
    color: var(--text);
    text-decoration: none;
}

.member-card h3 a:hover {
    color: var(--primary);
}

.member-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.gender-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
}

.gender-badge.male {
    background: rgba(33, 150, 243, 0.1);
    color: var(--male);
}

.gender-badge.female {
    background: rgba(233, 30, 99, 0.1);
    color: var(--female);
}

.status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    background: rgba(156, 39, 176, 0.1);
    color: var(--secondary);
}

.member-meta {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Section */
.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

/* Auth Pages */
.auth-container {
    max-width: 450px;
    margin: 40px auto;
}

.auth-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary);
}

.auth-link {
    text-align: center;
    margin-top: 15px;
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert p {
    margin: 5px 0;
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-info {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid var(--info);
    color: var(--info);
}

/* Profile */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    gap: 30px;
    align-items: center;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.profile-avatar {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
}

.profile-info h1 {
    margin-bottom: 10px;
}

.member-since {
    color: var(--text-light);
    margin-bottom: 15px;
}

.profile-actions {
    display: flex;
    gap: 10px;
}

.profile-details {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.profile-details h2 {
    margin-bottom: 20px;
    color: var(--primary);
}

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

.detail-item {
    padding: 10px;
    background: var(--bg);
    border-radius: 8px;
}

.detail-item label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.bio-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.bio-section h3 {
    margin-bottom: 10px;
}

.profile-edit {
    text-align: center;
}

/* Messages */
.compose-box {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.compose-box h2 {
    margin-bottom: 20px;
    color: var(--primary);
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    background: var(--card-bg);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

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

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-item {
    display: flex;
    gap: 15px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.message-item.unread {
    border-right: 4px solid var(--primary);
    background: rgba(233, 30, 99, 0.03);
}

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

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.message-time {
    color: var(--text-light);
    font-size: 0.85rem;
}

.message-subject {
    font-weight: bold;
    margin-bottom: 5px;
}

.message-preview {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.message-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Chat */
.chat-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    height: calc(100vh - 180px);
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.chat-sidebar {
    border-left: 1px solid var(--border);
    overflow-y: auto;
}

.chat-sidebar h3 {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.chat-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.chat-user-item:hover,
.chat-user-item.active {
    background: rgba(233, 30, 99, 0.05);
}

.chat-user-avatar {
    position: relative;
}

.chat-user-avatar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-main {
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-status {
    font-size: 0.85rem;
}

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

.chat-status.offline {
    color: var(--text-light);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
}

.chat-message.sent {
    background: var(--primary);
    color: white;
    align-self: flex-start;
    border-bottom-right: 4px;
}

.chat-message.received {
    background: var(--bg);
    align-self: flex-end;
    border-bottom-left: 4px;
}

.chat-time {
    display: block;
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 5px;
}

.chat-input {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.chat-input form {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 25px;
    font-size: 1rem;
}

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

.chat-input button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
}

.chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
}

/* Notifications */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.notification-item.unread {
    border-right: 4px solid var(--primary);
    background: rgba(233, 30, 99, 0.03);
}

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

.notif-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-content {
    flex: 1;
}

.notif-time {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
}

.notif-actions {
    display: flex;
    gap: 8px;
}

/* Search */
.search-box {
    margin-bottom: 30px;
}

.search-form {
    max-width: 800px;
    margin: 0 auto;
}

.search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-row input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: 25px;
    font-size: 1.1rem;
}

.search-filters {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

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

.search-results {
    margin-bottom: 30px;
}

.search-results > p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 1.2rem;
}

/* Settings */
.settings-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.settings-section h2 {
    margin-bottom: 20px;
    color: var(--primary);
}

.current-avatar {
    text-align: center;
    margin-bottom: 20px;
}

.current-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    font-size: 1.8rem;
}

/* Filter Bar */
.filter-bar {
    margin-bottom: 30px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-bar .filter-form {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: end;
    overflow-x: auto;
}

.filter-bar .filter-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    flex: 1;
}

.filter-bar .form-group {
    min-width: 120px;
    flex: 1;
}

.filter-bar .form-group label {
    font-size: 0.85rem;
    margin-bottom: 4px;
    display: block;
}

.filter-bar select,
.filter-bar input {
    padding: 8px 10px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination .btn {
    min-width: 40px;
}

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

/* Admin */
.admin-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.admin-section h2 {
    margin-bottom: 20px;
    color: var(--primary);
}

.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg);
    font-weight: bold;
}

.admin-table tr:hover {
    background: rgba(233, 30, 99, 0.02);
}

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

/* Online Page */
.online-count-badge {
    background: var(--online);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
}

.info-banner {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid var(--info);
    color: var(--info);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-banner i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.info-banner a {
    color: var(--primary);
    font-weight: bold;
    text-decoration: underline;
}

.info-banner.admin-banner {
    background: rgba(156, 39, 176, 0.1);
    border: 1px solid var(--secondary);
    color: var(--secondary);
}

.online-card {
    border-top: 3px solid var(--online);
}

.online-since {
    color: var(--online);
    font-size: 0.85rem;
    margin-top: 8px;
}

.member-quick-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

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

.btn-success:hover {
    background: #388e3c;
}

.btn-warning {
    background: #ff9800;
    color: white;
}

.no-chat-yet {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.chat-hint {
    margin-top: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.chat-hint a {
    color: var(--primary);
    text-decoration: underline;
}

/* Report Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: var(--danger);
    color: white;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin-bottom: 10px;
    font-weight: bold;
}

.modal-body textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
}

.modal-body textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 15px 20px;
    border-top: 1px solid var(--border);
}

.report-btn {
    flex-shrink: 0;
}

/* Online Table */
.online-table-wrapper {
    overflow-x: auto;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.online-table {
    width: 100%;
    border-collapse: collapse;
}

.online-table th,
.online-table td {
    padding: 15px 20px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

.online-table th {
    background: var(--primary);
    color: white;
    font-weight: bold;
}

.online-table tbody tr:hover {
    background: rgba(233, 30, 99, 0.03);
}

.online-table .table-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.online-table .table-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.status-dot-online,
.status-dot-offline {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.status-dot-online {
    background: var(--online);
    box-shadow: 0 0 6px var(--online);
}

.status-dot-offline {
    background: var(--danger);
    box-shadow: 0 0 6px var(--danger);
}

.profile-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--primary);
    font-size: 1.4rem;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.profile-icon-link:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.profile-icon-link::after {
    content: attr(title);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 10;
}

.profile-icon-link:hover::after {
    opacity: 1;
    visibility: visible;
}

.chat-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--secondary);
    font-size: 1.4rem;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    border: none;
    cursor: pointer;
}

.chat-icon-link:hover {
    background: var(--secondary);
    color: white;
    transform: scale(1.1);
}

.chat-icon-link.accepted {
    background: var(--success);
    color: white;
}

.chat-icon-link.accepted:hover {
    background: #388e3c;
}

.chat-icon-link.pending {
    background: #ff9800;
    color: white;
    cursor: default;
}

.chat-icon-link.pending:hover {
    transform: none;
}

.chat-icon-link::after {
    content: attr(title);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 10;
}

.chat-icon-link:hover::after {
    opacity: 1;
    visibility: visible;
}

.chat-icon-link.locked {
    background: #9e9e9e;
    color: white;
    cursor: not-allowed;
}

.chat-icon-link.locked:hover {
    transform: none;
}

.bio-locked {
    background: rgba(158, 158, 158, 0.1);
    border: 1px dashed #9e9e9e;
    text-align: center;
    color: #9e9e9e;
}

.bio-locked i {
    margin-left: 5px;
}

/* Membership */
.membership-section {
    border: 2px solid var(--primary);
}

.membership-info {
    text-align: center;
}

.current-membership {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.upgrade-box {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.upgrade-box h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.upgrade-box ul {
    list-style: none;
    margin-bottom: 20px;
    text-align: right;
}

.upgrade-box li {
    padding: 8px 0;
}

.upgrade-box li i {
    margin-left: 10px;
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.premium-active {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #333;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.premium-active i {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Membership Plans */
.membership-options {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.membership-plan {
    flex: 1;
    min-width: 100px;
}

.membership-plan input {
    display: none;
}

.membership-plan label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.membership-plan label:hover {
    background: rgba(255,255,255,0.3);
}

.membership-plan.selected label {
    border-color: white;
    background: rgba(255,255,255,0.4);
}

.plan-days {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.plan-price {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Admin Form */
.admin-form {
    max-width: 600px;
}

.admin-form .form-group {
    margin-bottom: 15px;
}

.admin-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.admin-form .form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}

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

/* Dropdown */
.btn-group {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 120px;
    z-index: 100;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg);
}

/* Admin Badges */
.badge-admin {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.badge-female {
    background: var(--female);
    color: white;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.badge-premium {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #333;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.badge-normal {
    background: #9e9e9e;
    color: white;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-top: 15px;
    }

    .nav-links.active {
        display: flex;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .members-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chat-container {
        grid-template-columns: 1fr;
    }

    .chat-sidebar {
        display: none;
    }

    .chat-sidebar.active {
        display: block;
        position: fixed;
        top: 70px;
        right: 0;
        bottom: 0;
        width: 280px;
        background: white;
        z-index: 999;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-actions {
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .message-item {
        flex-direction: column;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-bar .filter-form {
        flex-direction: column;
    }

    .filter-bar .filter-row {
        flex-wrap: wrap;
    }

    .filter-bar .form-group {
        min-width: 45%;
    }

    .filter-form select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .members-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 40px 15px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }
}

.text-green { color: var(--success); font-weight: bold; }
.text-red { color: var(--danger); font-weight: bold; }

.btn-disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-block;
    text-decoration: none;
}

.chat-icon-link.disabled {
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
}

/* Tickets */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ticket-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s;
}

.ticket-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ticket-item-info h3 {
    margin-bottom: 5px;
    font-size: 1rem;
}

.ticket-item-info p {
    color: var(--text-light);
    font-size: 0.85rem;
}

.ticket-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.ticket-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-open {
    background: rgba(76, 175, 80, 0.15);
    color: var(--success);
}

.status-replied {
    background: rgba(33, 150, 243, 0.15);
    color: var(--info);
}

.status-closed {
    background: rgba(158, 158, 158, 0.15);
    color: #999;
}

.ticket-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

.ticket-view {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ticket-header-detail {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.ticket-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

.ticket-info h2 {
    font-size: 1.2rem;
}

.ticket-user-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
}

.ticket-messages {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
}

.ticket-message {
    display: flex;
    gap: 12px;
}

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

.ticket-message .message-body {
    flex: 1;
    background: #f5f5f5;
    padding: 12px 16px;
    border-radius: 12px;
}

.ticket-message.admin-message .message-body {
    background: rgba(156, 39, 176, 0.08);
    border: 1px solid rgba(156, 39, 176, 0.2);
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.message-meta span {
    font-size: 0.8rem;
    color: var(--text-light);
}

.admin-badge {
    background: var(--secondary);
    color: white !important;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem !important;
}

.message-image img {
    max-width: 300px;
    border-radius: 8px;
    margin-top: 8px;
    cursor: pointer;
}

.ticket-reply-form {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.reply-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
