/* ====================== MODAL STYLES ====================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--modal-bg);
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    max-height: 86vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px 20px 0 0;
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-weight: 600;
    font-size: 1.4rem;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

/* ====================== FORM STYLES ====================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.modal-input {
    width: 100%;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.modal-input:focus {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 17, 203, 0.15);
    outline: none;
}

.modal-input:hover {
    border-color: var(--primary-color);
}

.modal-input::placeholder {
    color: var(--text-secondary);
}

textarea.modal-input {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

select.modal-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.modal-body .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
    transition: all 0.3s ease;
}

.modal-body .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.4);
}

/* ====================== INVITE MODAL STYLES ====================== */
.invite-link-container {
    display: flex;
    gap: 0.75rem;
}

.invite-link-container .modal-input {
    flex: 1;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.share-btn {
    padding: 0.75rem;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.share-btn.telegram {
    background: linear-gradient(135deg, #0088cc, #005c8a);
    color: white;
}

.share-btn.twitter {
    background: linear-gradient(135deg, #1DA1F2, #0d8bd9);
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.online-friends {
    margin-top: 1.5rem;
}

.online-friends h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    background: var(--input-bg);
    transition: all 0.3s ease;
}

.friend-item:hover {
    background: rgba(106, 17, 203, 0.1);
    transform: translateX(5px);
}

.friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.friend-status {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.invite-friend-btn {
    padding: 0.5rem 1rem;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.invite-friend-btn:hover {
    background: #22c55e;
    transform: translateY(-2px);
}

/* ====================== PROFILE MODAL STYLES ====================== */
.profile-modal-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.profile-modal-avatar {
    position: relative;
    flex-shrink: 0;
}

.profile-modal-avatar i {
    font-size: 4rem;
    color: var(--primary-color);
    background: var(--input-bg);
    padding: 1.5rem;
    border-radius: 50%;
}

.profile-modal-badges {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.bot-badge {
    background: var(--bot-color);
}

.moderator-badge {
    background: var(--warning-color);
}

.verified-badge {
    background: var(--success-color);
}

.vip-badge {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #000;
}

.profile-modal-info {
    flex: 1;
}

.profile-modal-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.profile-modal-status, .profile-modal-points {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-modal-points i {
    color: gold;
}

.profile-modal-description {
    margin: 1.5rem 0;
}

.profile-modal-description h4 {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.profile-modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.profile-modal-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ====================== LOADING SCREEN ====================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-secondary), var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    color: white;
}

.logo-spinner {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: spin 2s linear infinite;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 20px auto;
    overflow: hidden;
}

#loading-progress {
    width: 0%;
    height: 100%;
    background: white;
    border-radius: 2px;
    transition: width 0.3s ease;
}