* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Unbounded', sans-serif;
    line-height: 1.6;
    background: #ffffff;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(123, 31, 162, 0.05) 0%, transparent 100%),
        linear-gradient(rgba(0, 0, 0, 0.03) 2px, transparent 2px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 2px, transparent 2px);
    background-size: 100% 100%, 30px 30px, 30px 30px;
    background-position: 0 0, 0 0, 0 0;
    color: #1a1a1a;
    min-height: 100vh;
    overflow-x: hidden;
}

:root {
    font-family: 'Unbounded', sans-serif;
    --primary-purple: #7B1FA2;
    --secondary-purple: #9C27B0;
    --dark-purple: #4A148C;
    --light-purple: #CE93D8;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: rgba(255, 255, 255, 0.9);
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --gradient-purple: linear-gradient(135deg, #7B1FA2 0%, #9C27B0 100%);
    --gradient-bg: linear-gradient(135deg, #ffffff 0%, #f3e5f5 100%);
}

.header {
    font-family: 'Unbounded', sans-serif;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    max-width: 53%;
    margin: 0 auto;
    border-radius: 0 0 25px 25px;
}

.header-content {
    font-family: 'Unbounded', sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}


.header-link {
    font-family: 'Unbounded', sans-serif;
    background: var(--gradient-purple);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    box-shadow: 0 4px 15px rgba(153, 69, 255, 0.3);
    transition: all 0.3s ease;
}

.header-link i {
    font-size: 0.9rem;
}

.header-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(153, 69, 255, 0.4);
    background: linear-gradient(135deg, #8034db 0%, #a66ef4 100%);
}

.main-content {
    font-family: 'Unbounded', sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    min-height: calc(100vh - 100px);
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    align-items: start;
}

.social-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    position: sticky;
    top: 120px;
    height: fit-content;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.social-header {
    font-family: 'Unbounded', sans-serif;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.social-header h3 {
    font-family: 'Unbounded', sans-serif;
    color: var(--primary-purple);
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.social-link:hover {
    transform: translateX(8px);
    border-color: var(--primary-purple);
    background: #f9f9f9;
    box-shadow: 0 8px 24px rgba(123, 31, 162, 0.15);
}

.social-link i {
    font-size: 1.5rem;
    width: 32px;
    text-align: center;
}

.social-link.telegram i { color: #0088cc; }
.social-link.youtube i { color: #ff0000; }
.social-link.twitch i { color: #9146ff; }
.social-link.discord i { color: #5865F2; }
.social-link.github i { color: #24292e; }


.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3rem;
    width: 100%;
}

.avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.avatar-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}

.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gradient-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(153, 69, 255, 0.3);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--gradient-purple);
    color: white;
    font-size: 3rem;
}

.username {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    margin-bottom: 0;
    line-height: 1.2;
}

.userid {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.bio-section {
    width: 100%;
    max-width: 600px;
}

.greeting {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 400;
}

.info-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 3rem;
}

.info-item {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-item:hover {
    border-color: var(--primary-purple);
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(123, 31, 162, 0.1);
}

.label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.status-online i {
    color: #22c55e;
    font-size: 0.6rem;
    margin-right: 0.5rem;
}


.about-section,
.activity-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.about-section:hover,
.activity-section:hover {
    border-color: var(--primary-purple);
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(123, 31, 162, 0.1);
}

.about-section h3,
.activity-section h3 {
    color: var(--primary-purple);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.activity-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-item:hover {
    border-color: var(--primary-purple);
    background: #f9f9f9;
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.1);
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    color: var(--primary-purple);
    font-weight: 700;
    font-size: 1.5rem;
}

/* ==================== АДАПТИВНОСТЬ ==================== */

/* Планшеты в ландшафтной ориентации */
@media (max-width: 1200px) {
    .header {
        max-width: 70%;
    }
    
    .main-content {
        grid-template-columns: 300px 1fr;
        gap: 2rem;
        padding: 3rem 1.5rem;
    }
}

/* Планшеты */
@media (max-width: 1024px) {
    .header {
        max-width: 85%;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1.5rem;
    }
    
    .social-panel {
        position: static;
        order: 2;
        max-height: none;
    }
    
    .profile-container {
        order: 1;
    }
    
    .bio-section {
        max-width: 100%;
    }
    
    /* Соц. ссылки в 2 колонки на планшетах */
    .social-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .social-link:hover {
        transform: translateY(-3px);
    }
}

/* Маленькие планшеты и большие телефоны */
@media (max-width: 768px) {
    .header {
        max-width: 100%;
        border-radius: 0;
        padding: 0.75rem 0;
    }
    
    .header-content {
        padding: 0 1rem;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .logo h1 {
        font-size: 1.1rem;
    }
    
    .header-link {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        border-radius: 10px;
    }
    
    .header-link-icon {
        display: none;
    }
    
    .main-content {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }
    
    .username {
        font-size: 1.8rem;
    }
    
    .avatar-wrapper {
        width: 140px;
        height: 140px;
    }
    
    .avatar {
        width: 140px;
        height: 140px;
    }
    
    .avatar-section {
        gap: 1rem;
    }
    
    .badge {
        font-size: 1.2rem;
    }
    
    .greeting {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }
    
    .social-panel {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .social-header h3 {
        font-size: 1.2rem;
    }
    
    /* Соц. ссылки в 1 колонку на телефонах */
    .social-links {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .social-link {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        border-radius: 10px;
    }
    
    .social-link:hover {
        transform: translateX(5px);
    }
    
    .social-link i {
        font-size: 1.25rem;
        width: 28px;
    }
    
    .info-item {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .info-grid {
        margin-bottom: 2rem;
    }
    
    .about-section,
    .activity-section {
        padding: 1.5rem;
        border-radius: 14px;
        margin-bottom: 1.5rem;
    }
    
    .about-section h3,
    .activity-section h3 {
        font-size: 1.2rem;
    }
    
    .sidebar-message-btn {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        border-radius: 10px;
    }
    
    .sidebar-message-btn:hover {
        transform: translateX(5px);
    }
    
    .sidebar-message-btn i {
        font-size: 1.25rem;
        width: 28px;
    }
    
    /* Статистика в 2 колонки */
    .activity-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-item {
        padding: 0.875rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

/* Телефоны */
@media (max-width: 480px) {
    .header {
        padding: 0.6rem 0;
    }
    
    .header-content {
        padding: 0 0.75rem;
    }
    
    .logo h1 {
        font-size: 0.95rem;
    }
    
    .header-link {
        font-size: 0.7rem;
        padding: 0.4rem 0.7rem;
        border-radius: 8px;
    }
    
    .main-content {
        padding: 1rem 0.75rem;
        gap: 1.25rem;
    }
    
    .profile-container {
        gap: 2rem;
    }
    
    .avatar-section {
        gap: 0.75rem;
    }
    
    .username {
        font-size: 1.5rem;
        word-break: break-word;
    }
    
    .username-row {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .userid {
        font-size: 0.9rem;
    }
    
    .avatar-wrapper {
        width: 120px;
        height: 120px;
    }
    
    .avatar {
        width: 120px;
        height: 120px;
    }
    
    .badge {
        font-size: 1rem;
    }
    
    .greeting {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    
    .bio-section {
        padding: 0 0.25rem;
    }
    
    .social-panel {
        padding: 1rem;
        border-radius: 14px;
    }
    
    .social-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .social-header h3 {
        font-size: 1.1rem;
    }
    
    .social-links {
        gap: 0.6rem;
    }
    
    .social-link {
        padding: 0.75rem;
        font-size: 0.8rem;
        gap: 0.75rem;
        border-radius: 10px;
    }
    
    .social-link i {
        font-size: 1.1rem;
        width: 24px;
    }
    
    .sidebar-message-btn {
        padding: 0.75rem;
        font-size: 0.8rem;
        gap: 0.75rem;
        border-radius: 10px;
    }
    
    .sidebar-message-btn i {
        font-size: 1.1rem;
        width: 24px;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
        text-align: left;
        padding: 0.875rem;
        border-radius: 10px;
    }
    
    .label {
        font-size: 0.8rem;
    }
    
    .value {
        font-size: 0.85rem;
    }
    
    .about-section,
    .activity-section {
        padding: 1rem;
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    
    .about-section h3,
    .activity-section h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .about-section p {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    /* Статистика в 1 колонку на маленьких экранах */
    .activity-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-item {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.75rem 1rem;
    }
    
    .stat-label {
        margin-bottom: 0;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
}

/* Очень маленькие телефоны */
@media (max-width: 360px) {
    .header-content {
        padding: 0 0.5rem;
    }
    
    .logo h1 {
        font-size: 0.85rem;
    }
    
    .header-link {
        font-size: 0.65rem;
        padding: 0.35rem 0.6rem;
    }
    
    .main-content {
        padding: 0.75rem 0.5rem;
    }
    
    .username {
        font-size: 1.3rem;
    }
    
    .avatar-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
    
    .greeting {
        font-size: 0.85rem;
    }
    
    .social-panel {
        padding: 0.875rem;
    }
    
    .social-link {
        padding: 0.65rem;
        font-size: 0.75rem;
    }
    
    .sidebar-message-btn {
        padding: 0.65rem;
        font-size: 0.75rem;
    }
}

/* Ландшафтная ориентация на телефонах */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 0.5rem 0;
        position: relative;
    }
    
    .main-content {
        padding: 1rem;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        min-height: auto;
    }
    
    .social-panel {
        order: 1;
        position: static;
    }
    
    .profile-container {
        order: 2;
    }
    
    .avatar-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .avatar {
        width: 80px;
        height: 80px;
    }
    
    .username {
        font-size: 1.3rem;
    }
    
    .greeting {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .social-links {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .social-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Улучшения для тач-устройств */
@media (hover: none) and (pointer: coarse) {
    .social-link:hover,
    .sidebar-message-btn:hover {
        transform: none;
    }
    
    .social-link:active,
    .sidebar-message-btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .header-link:hover {
        transform: none;
    }
    
    .header-link:active {
        transform: scale(0.97);
    }
    
    .info-item:hover,
    .about-section:hover,
    .activity-section:hover,
    .stat-item:hover {
        transform: none;
        border-color: var(--border-color);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .badge:hover {
        transform: none;
    }
    
    /* Увеличиваем области нажатия для тач */
    .social-link,
    .sidebar-message-btn {
        min-height: 48px;
    }
    
    .header-link {
        min-height: 44px;
    }
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-purple);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-purple);
}

::selection {
    background: var(--primary-purple);
    color: white;
}


/* Бейджи */
.username-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.badge {
    font-size: 1.8rem;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease;
    margin-top: 0.3rem;
}

.badge:hover {
    transform: scale(1.15);
}

.badge-owner i {
    color: #1a1a1a;
}

.badge-admin i {
    color: var(--primary-purple);
}

/* Тултип при наведении */
.badge::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 6px;
    z-index: 100;
}

.badge:hover::after {
    opacity: 1;
    visibility: visible;
}


/* Статус онлайн как в Discord */
.status-indicator {
    position: absolute;
    bottom: 5%;
    right: 5%;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    cursor: pointer;
    z-index: 10;
    box-sizing: content-box;
}

.status-indicator.online {
    background: #23a55a;
}

.status-indicator.offline {
    background: #80848e;
}

.status-indicator.idle {
    background: #f0b232;
}

.status-indicator.dnd {
    background: #f23f43;
}

/* Тултип для статуса */
.status-indicator::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.status-indicator:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Кнопка Написать */
.message-btn {
    font-family: 'Unbounded', sans-serif;
    background: var(--gradient-purple);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(123, 31, 162, 0.3);
    transition: all 0.3s ease;
}

.message-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 31, 162, 0.4);
    background: linear-gradient(135deg, #8034db 0%, #a66ef4 100%);
}

.message-btn:active {
    transform: translateY(0);
}

.message-btn i {
    font-size: 1rem;
}


/* Кнопка Написать в сайдбаре - как social-link */
.sidebar-message-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    width: 100%;
    cursor: pointer;
    font-family: 'Unbounded', sans-serif;
    justify-content: flex-start;
    margin-top: 0;
}

.sidebar-message-btn:hover {
    transform: translateX(8px);
    border-color: var(--primary-purple);
    background: #f9f9f9;
    box-shadow: 0 8px 24px rgba(123, 31, 162, 0.15);
}

.sidebar-message-btn i {
    font-size: 1.5rem;
    width: 32px;
    text-align: center;
    color: var(--primary-purple);
}


/* Фиксы для мобильных - галочки и статус */
@media (max-width: 768px) {
    .username-row {
        gap: 0.4rem;
    }
    
    .badge {
        font-size: 1.1rem;
    }
    
    .status-indicator {
        width: 22px;
        height: 22px;
        border-width: 3px;
    }
}

@media (max-width: 480px) {
    .username-row {
        gap: 0.3rem;
    }
    
    .badge {
        font-size: 1rem;
    }
    
    .avatar-section {
        gap: 0.75rem;
    }
    
    .status-indicator {
        width: 18px;
        height: 18px;
        border-width: 3px;
    }
}

@media (max-width: 360px) {
    .status-indicator {
        width: 16px;
        height: 16px;
        border-width: 2px;
    }
}

/* Safe area для устройств с вырезами (iPhone X и т.д.) */
@supports (padding: max(0px)) {
    .header {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .main-content {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}








/* ==================== ГЛАВНАЯ СТРАНИЦА ==================== */
.home-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.home-hero {
    margin-bottom: 3rem;
}

.home-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(123, 31, 162, 0.3);
}

.home-logo i {
    font-size: 3.5rem;
    color: white;
}

.home-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.home-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.home-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    width: 100%;
}

.home-feature {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    transition: all 0.3s ease;
}

.home-feature:hover {
    border-color: var(--primary-purple);
    box-shadow: 0 8px 24px rgba(123, 31, 162, 0.15);
    transform: translateY(-4px);
}

.home-feature i {
    font-size: 2.5rem;
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

.home-feature h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.home-feature p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.home-actions {
    display: flex;
    gap: 1rem;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Unbounded', sans-serif;
}

.home-btn.primary {
    background: var(--gradient-purple);
    color: white;
    box-shadow: 0 4px 15px rgba(123, 31, 162, 0.3);
}

.home-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 31, 162, 0.4);
}

.home-btn.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.home-btn.secondary:hover {
    border-color: var(--primary-purple);
    background: #f9f9f9;
}

/* Адаптивность главной */
@media (max-width: 768px) {
    .home-title {
        font-size: 1.8rem;
    }
    
    .home-subtitle {
        font-size: 1rem;
    }
    
    .home-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .home-feature {
        padding: 1.5rem;
    }
    
    .home-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .home-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .home-container {
        padding: 1rem;
    }
    
    .home-logo {
        width: 100px;
        height: 100px;
    }
    
    .home-logo i {
        font-size: 2.5rem;
    }
    
    .home-title {
        font-size: 1.5rem;
    }
    
    .home-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}


/* ==================== PROFILE EDITOR ==================== */

/* Ограничение высоты страницы */
.main-content {
    max-height: 100vh;
    overflow: hidden;
}

.profile-container {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Кнопка добавления блока */
.editor-add-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.editor-add-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(123, 31, 162, 0.4);
    transition: all 0.3s ease;
}

.editor-add-icon i {
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.editor-add-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(123, 31, 162, 0.5);
}

.editor-add-icon.active {
    transform: rotate(45deg);
}

.editor-add-icon.active i {
    transform: rotate(0deg);
}

/* Меню блоков */
.editor-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s ease;
    overflow: hidden;
}

.editor-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.editor-menu-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
}

.beta-badge {
    background: var(--gradient-purple);
    color: white;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.editor-menu-items {
    max-height: 300px;
    overflow-y: auto;
}

.editor-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-menu-item:hover {
    background: rgba(123, 31, 162, 0.08);
}

.editor-menu-item i {
    width: 36px;
    height: 36px;
    background: rgba(123, 31, 162, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-purple);
    font-size: 1rem;
}

.editor-menu-item-info {
    display: flex;
    flex-direction: column;
}

.editor-menu-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.editor-menu-item-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.editor-menu-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.blocks-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Контейнер пользовательских блоков */
.custom-blocks-container {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Общие стили блоков */
.custom-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    animation: blockAppear 0.3s ease;
}

.custom-block.removing {
    animation: blockRemove 0.3s ease forwards;
}

@keyframes blockAppear {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes blockRemove {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

.block-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
}

.custom-block:hover .block-delete {
    opacity: 1;
}

.block-delete:hover {
    background: #ef4444;
    color: white;
}

/* Блок div */
.custom-block-div {
    min-height: 80px;
    background: linear-gradient(135deg, rgba(123, 31, 162, 0.03) 0%, rgba(156, 39, 176, 0.05) 100%);
    border: 2px dashed rgba(123, 31, 162, 0.2);
}

.custom-block-div:hover {
    border-color: var(--primary-purple);
    background: linear-gradient(135deg, rgba(123, 31, 162, 0.05) 0%, rgba(156, 39, 176, 0.08) 100%);
}

.block-div-container {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.block-div-placeholder {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 1rem;
}

/* Блок текста */
.block-content {
    min-height: 40px;
    outline: none;
    color: var(--text-primary);
    line-height: 1.6;
}

.block-content:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
}

/* Блок изображения */
.block-image-upload {
    position: relative;
}

.block-image-upload input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.block-image-placeholder {
    height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.block-image-placeholder:hover {
    border-color: var(--primary-purple);
    background: rgba(123, 31, 162, 0.05);
}

.block-image-placeholder i {
    font-size: 2rem;
    color: var(--primary-purple);
}

.block-image-preview {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* Блок ссылки */
.block-link-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.block-input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.block-input:focus {
    border-color: var(--primary-purple);
}

/* Блок соцсетей */
.block-social-grid {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.block-social-item {
    width: 44px;
    height: 44px;
    background: rgba(123, 31, 162, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.block-social-item:hover {
    background: var(--primary-purple);
    color: white;
}

.block-social-item i {
    font-size: 1.25rem;
    color: var(--primary-purple);
}

.block-social-item:hover i {
    color: white;
}

/* Разделитель */
.block-divider {
    height: 2px;
    background: var(--border-color);
    border-radius: 1px;
}

/* Цитата */
.block-quote {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
}

.block-quote > i {
    color: var(--primary-purple);
    font-size: 1.5rem;
    opacity: 0.5;
}

.block-quote-text {
    flex: 1;
    font-style: italic;
    color: var(--text-secondary);
    outline: none;
    min-height: 30px;
}

.block-quote-text:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
}

/* Уведомления */
.editor-notification {
    position: fixed;
    bottom: 100px;
    right: 30px;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.editor-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.editor-notification.warning {
    border-left: 4px solid #f59e0b;
}

.editor-notification.error {
    border-left: 4px solid #ef4444;
}

.editor-notification.success {
    border-left: 4px solid #22c55e;
}

/* Адаптивность редактора */
@media (max-width: 768px) {
    .editor-add-btn {
        bottom: 20px;
        right: 20px;
    }
    
    .editor-add-icon {
        width: 50px;
        height: 50px;
    }
    
    .editor-menu {
        width: 260px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .editor-add-btn {
        bottom: 15px;
        right: 15px;
    }
    
    .editor-add-icon {
        width: 46px;
        height: 46px;
    }
    
    .editor-add-icon i {
        font-size: 1.25rem;
    }
    
    .editor-menu {
        width: calc(100vw - 30px);
        right: -7px;
    }
}


/* ==================== SKELETON LOADING ==================== */
.skeleton-text {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
    -webkit-background-clip: text;
    background-clip: text;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.profile-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.profile-container.loaded .skeleton-text {
    background: none;
    animation: none;
    color: inherit !important;
}
