/* ============================================
   HavenCraft — Profile Page Styles
   ============================================ */

/* Modern Profile Redesign */
.profile-banner-new {
    background: linear-gradient(rgba(10, 14, 23, 0.85), rgba(10, 14, 23, 0.95)), url('../images/bg-minecraft.jpg') center/cover;
    border-radius: 16px;
    padding: 40px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.profile-avatar-wrapper {
    position: relative;
    width: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.profile-avatar-wrapper canvas {
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.profile-avatar-wrapper canvas:hover {
    transform: scale(1.05);
}

.stat-card-new,
.profile-card,
.btn {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.stat-card-new:hover,
.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-banner-new {
    animation: fadeInUp 0.5s ease both;
}

.stats-row-new {
    animation: fadeInUp 0.6s ease both;
}

.performance-stats-row-wrapper {
    animation: fadeInUp 0.7s ease both;
}

.vote-cooldowns-wrapper {
    animation: fadeInUp 0.8s ease both;
}

.profile-link-wrapper {
    animation: fadeInUp 0.9s ease both;
}

.profile-info-new .profile-name {
    font-size: 3.5rem;
    font-weight: 800;
    color: #00c896;
    margin-bottom: 5px;
}

.profile-info-new .profile-sub {
    color: #a0aec0;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Profile Rank Tag */
.profile-rank-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.profile-rank-tag.rank-owner {
    background: rgba(255, 80, 80, 0.12);
    color: #ff5050;
    border: 1px solid rgba(255, 80, 80, 0.3);
}

.profile-rank-tag.rank-admin {
    background: rgba(255, 183, 0, 0.12);
    color: #FFB700;
    border: 1px solid rgba(255, 183, 0, 0.3);
}

.profile-rank-tag.rank-mod {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.profile-rank-tag.rank-officer {
    background: rgba(0, 200, 150, 0.12);
    color: #00c896;
    border: 1px solid rgba(0, 200, 150, 0.3);
}

.profile-rank-tag.rank-helper {
    background: rgba(160, 174, 192, 0.12);
    color: #a0aec0;
    border: 1px solid rgba(160, 174, 192, 0.3);
}

.profile-rank-tag.rank-paid {
    background: rgba(168, 85, 247, 0.12);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Unified Master Dashboard */
.profile-unified-dashboard {
    background: linear-gradient(160deg, rgba(16, 21, 33, 0.88) 0%, rgba(10, 14, 22, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.profile-stat-group {
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-stat-group:last-of-type {
    border-bottom: none;
}

.profile-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-group-header i {
    font-size: 1rem;
}

.text-accent {
    color: #FFB700;
}

.text-danger {
    color: #ff5050;
}

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

/* Profile Breadcrumb Navigation */
.profile-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-breadcrumb .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.profile-breadcrumb .breadcrumb-item i {
    font-size: 0.8rem;
    opacity: 0.8;
}

.profile-breadcrumb .breadcrumb-item:hover {
    color: var(--primary);
}

.profile-breadcrumb .breadcrumb-sep {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
}

.profile-breadcrumb .breadcrumb-item.active {
    color: var(--primary);
    font-weight: 600;
}

.stat-item-modern {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    min-width: 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item-modern:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 200, 150, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 0 15px rgba(0, 200, 150, 0.08);
}

/* Rank badge styling */
.stat-rank-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    letter-spacing: 0.3px;
    line-height: 1.2;
    z-index: 2;
}

.rank-badge-gold {
    background: rgba(255, 183, 0, 0.12);
    color: #FFB700;
    border: 1px solid rgba(255, 183, 0, 0.25);
}

.rank-badge-cyan {
    background: rgba(0, 229, 255, 0.12);
    color: #00e5ff;
    border: 1px solid rgba(0, 229, 255, 0.25);
}

.rank-badge-purple {
    background: rgba(168, 85, 247, 0.12);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.rank-badge-red {
    background: rgba(255, 80, 80, 0.12);
    color: #ff5050;
    border: 1px solid rgba(255, 80, 80, 0.25);
}

.rank-badge-amber {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.rank-badge-pink {
    background: rgba(236, 72, 153, 0.12);
    color: #ec4899;
    border: 1px solid rgba(236, 72, 153, 0.25);
}

.stat-icon-modern {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.stat-data-modern {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.stat-data-modern .stat-val {
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-data-modern .stat-label {
    font-size: 0.8rem;
    color: #8f9baf;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    line-height: 1.2;
    word-break: break-word;
}

/* Integrated Share Toolbar */
.profile-share-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 28px;
    background: rgba(9, 12, 18, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    gap: 16px;
    flex-wrap: wrap;
}

.profile-share-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.profile-share-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.profile-share-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 7px 14px;
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 480px;
}

.profile-share-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.profile-share-copy-btn {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.profile-share-download-btn {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(0, 200, 150, 0.08) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(0, 200, 150, 0.25) !important;
    transition: all 0.25s ease;
}

.profile-share-download-btn:hover {
    background: rgba(0, 200, 150, 0.16) !important;
    border-color: rgba(0, 200, 150, 0.4) !important;
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .profile-banner-new {
        flex-direction: column;
        text-align: center;
    }

    .profile-info-new .profile-badges {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .profile-info-new .profile-name {
        font-size: 2.5rem;
    }

    .profile-link-wrapper {
        padding: 15px;
        gap: 10px;
    }

    .profile-share-copy-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

.profile-split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.profile-about-card,
.profile-performance-card {
    background: linear-gradient(145deg, rgba(17, 21, 32, 0.8), rgba(17, 21, 32, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
}

.about-title,
.perf-title {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.about-text {
    color: #a0aec0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.perf-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.perf-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.perf-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.perf-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.perf-label {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.perf-val {
    font-weight: 700;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .profile-split-section {
        grid-template-columns: 1fr;
    }
}

.stats-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stats-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1150px) {
    .stats-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .stats-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

@media (max-width: 768px) {
    .profile-stat-group {
        padding: 18px 16px;
    }

    .profile-share-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 12px;
    }

    .profile-share-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    .profile-share-link {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .profile-share-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .profile-share-copy-btn,
    .profile-share-download-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .profile-info-new .profile-name {
        font-size: 2.5rem;
    }

    .profile-breadcrumb {
        font-size: 0.78rem;
        gap: 6px;
    }

    .profile-stat-group {
        padding: 16px 12px;
    }

    .stats-grid-4,
    .stats-grid-5,
    .stats-grid-3 {
        gap: 10px;
    }

    .stat-item-modern {
        padding: 12px 10px;
        gap: 10px;
    }

    .stat-icon-modern {
        width: 38px;
        height: 38px;
        font-size: 1.15rem;
        border-radius: 10px;
    }

    .stat-data-modern .stat-val {
        font-size: 1.25rem;
    }

    .stat-data-modern .stat-label {
        font-size: 0.72rem;
        letter-spacing: 0.3px;
    }

    .stat-rank-badge {
        font-size: 0.65rem;
        padding: 1px 5px;
        top: 6px;
        right: 6px;
    }
}

.profile-rank-tag {
    margin-bottom: 0 !important;
}

#profileRankTag {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 480px) {
    .profile-info-new .profile-name {
        font-size: 2rem;
        word-break: break-word;
    }

    .profile-rank-tag {
        font-size: 0.75rem;
        padding: 3px 8px;
    }

    .profile-stat-group {
        padding: 14px 10px;
    }

    .stats-grid-4,
    .stats-grid-5,
    .stats-grid-3 {
        gap: 8px;
    }

    .stat-item-modern {
        padding: 14px 6px 12px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
    }

    .stat-icon-modern {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        border-radius: 9px;
        margin-bottom: 2px;
    }

    .stat-data-modern {
        align-items: center;
        width: 100%;
    }

    .stat-data-modern .stat-val {
        font-size: 1.18rem;
    }

    .stat-data-modern .stat-label {
        font-size: 0.68rem;
        text-align: center;
    }

    .stat-rank-badge {
        top: 5px;
        right: 5px;
        font-size: 0.62rem;
        padding: 1px 4px;
    }
}

/* ============================================
   Profile Skeleton Loading Screen 
   ============================================ */
.profile-skeleton-wrapper {
    animation: fadeIn 0.3s ease both;
    width: 100%;
}

.profile-skeleton-banner {
    background: linear-gradient(rgba(10, 14, 23, 0.85), rgba(10, 14, 23, 0.95));
    border-radius: 16px;
    padding: 40px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.profile-skeleton-avatar {
    width: 140px;
    height: 220px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-skeleton-avatar::after {
    content: '\f11b';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.05);
}

.profile-skin-skeleton {
    width: 140px;
    height: 220px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.08);
    font-size: 3.5rem;
}

.profile-skeleton-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    max-width: 480px;
    margin-left: 20px;
}

.profile-skeleton-bar {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.profile-skeleton-name {
    height: 48px;
    width: 65%;
    border-radius: 10px;
}

.profile-skeleton-sub {
    height: 20px;
    width: 42%;
    margin-bottom: 6px;
}

.profile-skeleton-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.profile-skeleton-pill {
    height: 28px;
    width: 100px;
    border-radius: 20px;
}

/* Unified Dashboard Skeleton */
.profile-skeleton-dashboard {
    background: linear-gradient(160deg, rgba(16, 21, 33, 0.88) 0%, rgba(10, 14, 22, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}

.profile-skeleton-group {
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-skeleton-group:last-of-type {
    border-bottom: none;
}

.profile-skeleton-header {
    height: 22px;
    width: 180px;
    margin-bottom: 18px;
    border-radius: 6px;
}

.profile-skeleton-card {
    height: 72px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-skeleton-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.profile-skeleton-card-texts {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.profile-skeleton-card-val {
    height: 18px;
    width: 60%;
    border-radius: 4px;
}

.profile-skeleton-card-label {
    height: 11px;
    width: 40%;
    border-radius: 3px;
}

/* Gallery & YouTube/FB Style Shimmer Sweep */
.profile-skeleton-avatar::before,
.profile-skin-skeleton::before,
.profile-skeleton-bar::before,
.profile-skeleton-card::before,
.profile-skeleton-card-icon::before,
.profile-skeleton-card-val::before,
.profile-skeleton-card-label::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.06) 50%,
            transparent 100%);
    transform: translateX(-100%);
    animation: profile-shimmer 1.6s infinite ease-in-out;
}

@keyframes profile-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 768px) {
    .profile-skeleton-banner {
        flex-direction: column;
        text-align: center;
        padding: 30px 16px;
        gap: 20px;
    }

    .profile-skeleton-info {
        margin-left: 0;
        align-items: center;
        width: 100%;
        max-width: 100%;
    }

    .profile-skeleton-name {
        width: 75%;
        height: 38px;
    }

    .profile-skeleton-sub {
        width: 50%;
    }

    .profile-skeleton-badges {
        justify-content: center;
    }

    .profile-skeleton-group {
        padding: 18px 16px;
    }
}

@media (max-width: 480px) {
    .profile-skeleton-card {
        padding: 14px 6px 12px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
        height: auto;
    }

    .profile-skeleton-card-icon {
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }

    .profile-skeleton-card-texts {
        align-items: center;
        width: 100%;
    }

    .profile-skeleton-card-val {
        width: 70%;
    }

    .profile-skeleton-card-label {
        width: 50%;
    }
}