/* Profile Page Styles - Matching Site Design */

.profile-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Profile Header Section */
.profile-header {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.05) 0%, rgba(0, 188, 212, 0.02) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Profile Header Background Grid */
.profile-background-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
    opacity: 0.25;
}

.profile-background-grid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.6) 0%, rgba(42, 42, 42, 0.4) 50%, rgba(26, 26, 26, 0.6) 100%);
    pointer-events: none;
    z-index: 2;
}

.profile-chip-grid-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.profile-chip-item {
    position: absolute;
    width: 160px;
    height: 160px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: none;
    backdrop-filter: none;
    transition: all 0.3s ease;
    overflow: hidden;
    /* Physics-based positioning will be handled by JavaScript */
    /* Background chips are decorative only - no interactions */
    pointer-events: none;
    cursor: default;
}

.profile-chip-item:hover {
    /* Disable hover effects for background chips */
    transform: none;
    z-index: 1;
}

.profile-chip-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 8px;
    border: 2px solid rgba(0, 188, 212, 0.3);
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.2);
}

.profile-chip-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
    filter: brightness(1.1) contrast(1.1);
}

.profile-chip-item:hover .profile-chip-image img {
    /* Disable hover effects for background chips */
    transform: none;
    filter: brightness(1.1) contrast(1.1);
}

.profile-chip-info {
    text-align: center;
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    padding: 4px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0 0 50px 50px;
    opacity: 0;
    transition: all 0.3s ease;
}

.profile-chip-item:hover .profile-chip-info {
    /* Disable hover effects for background chips */
    opacity: 0;
    bottom: -5px;
}

.profile-chip-name {
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-chip-creator {
    color: #00bcd4;
    font-size: 0.5rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-chip-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #00bcd4;
    font-size: 2rem;
    opacity: 0.5;
    width: 100%;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border-radius: 50%;
}

/* Fallback pattern when no chips are available */
.profile-fallback-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.2;
}

.profile-pattern-row {
    display: flex;
    gap: 20px;
    animation: scrollHorizontal 30s linear infinite;
}

.profile-pattern-chip {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 2px solid rgba(0, 188, 212, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00bcd4;
    font-size: 1.5rem;
    opacity: 0.6;
}

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

.profile-header-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 25px;
    align-items: center;
    position: relative;
    z-index: 3;
}

/* Profile Avatar */
.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(0, 188, 212, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #00bcd4;
    opacity: 0.7;
}

/* Profile Info */
.profile-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-username {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #e0e0e0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.profile-location {
    font-size: 1rem;
    color: #b0b0b0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.profile-stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #00bcd4;
}

.stat-label {
    font-size: 0.8rem;
    color: #b0b0b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile Actions */
.profile-actions {
    margin-top: 15px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-edit-profile {
    background: rgba(0, 188, 212, 0.1);
    color: #00bcd4;
    border: 1px solid rgba(0, 188, 212, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-edit-profile:hover {
    background: rgba(0, 188, 212, 0.2);
    border-color: rgba(0, 188, 212, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 188, 212, 0.2);
}

.btn-edit-profile:active {
    transform: translateY(0);
}

/* Social Links, Designer Links, and Bio Section */
.profile-social-bio {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    align-items: stretch;
}

/* Social Links Section */
.profile-social {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.profile-social h3 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-social h3::before {
    content: '';
    width: 3px;
    height: 18px;
    background: #00bcd4;
    border-radius: 2px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #b0b0b0;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
    cursor: pointer;
    box-sizing: border-box;
    width: 100%;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.social-link i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.social-link span {
    font-size: 0.95rem;
}

/* Social platform specific colors */
.social-link[href*="facebook.com"]:hover,
.social-link[href*="fb.com"]:hover {
    background: rgba(66, 103, 178, 0.2);
    color: #4267b2;
    border-color: #4267b2;
}

.social-link[href*="twitter.com"]:hover,
.social-link[href*="x.com"]:hover {
    background: rgba(29, 161, 242, 0.2);
    color: #1da1f2;
    border-color: #1da1f2;
}

.social-link[href*="instagram.com"]:hover {
    background: rgba(225, 48, 108, 0.2);
    color: #e1306c;
    border-color: #e1306c;
}

.social-link[href*="youtube.com"]:hover,
.social-link[href*="youtu.be"]:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff0000;
    border-color: #ff0000;
}

.social-link[href*="github.com"]:hover {
    background: rgba(36, 41, 46, 0.2);
    color: #24292e;
    border-color: #24292e;
}

.social-link[href*="bsky.app"]:hover,
.social-link[href*="bluesky"]:hover {
    background: rgba(0, 123, 255, 0.2);
    color: #007bff;
    border-color: #007bff;
}

/* Designer Links specific colors */
.social-link[href*="makerworld"]:hover {
    background: rgba(255, 107, 0, 0.2);
    color: #ff6b00;
    border-color: #ff6b00;
}

.social-link[href*="printables"]:hover {
    background: rgba(0, 150, 136, 0.2);
    color: #009688;
    border-color: #009688;
}

.social-link[href*="thangs"]:hover {
    background: rgba(156, 39, 176, 0.2);
    color: #9c27b0;
    border-color: #9c27b0;
}

.social-link[href*="patreon"]:hover {
    background: rgba(255, 66, 77, 0.2);
    color: #ff424d;
    border-color: #ff424d;
}

/* Designer Links Section */
.profile-designer {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.profile-designer h3 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-designer h3::before {
    content: '';
    width: 3px;
    height: 18px;
    background: #00bcd4;
    border-radius: 2px;
}

.designer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.designer-link,
.profile-designer .designer-link,
.profile-social-bio .designer-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: #b0b0b0 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.designer-link:hover,
.profile-designer .designer-link:hover,
.profile-social-bio .designer-link:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3) !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.designer-link i,
.profile-designer .designer-link i,
.profile-social-bio .designer-link i {
    font-size: 1.2rem !important;
    width: 20px !important;
    text-align: center !important;
}

.designer-link span,
.profile-designer .designer-link span,
.profile-social-bio .designer-link span {
    font-size: 0.95rem !important;
}

/* Designer platform specific colors */
.designer-link.makerworld:hover,
.profile-designer .designer-link.makerworld:hover,
.profile-social-bio .designer-link.makerworld:hover {
    background: rgba(255, 107, 0, 0.2) !important;
    color: #ff6b00 !important;
    border-color: #ff6b00 !important;
}

.designer-link.printables:hover,
.profile-designer .designer-link.printables:hover,
.profile-social-bio .designer-link.printables:hover {
    background: rgba(0, 150, 136, 0.2) !important;
    color: #009688 !important;
    border-color: #009688 !important;
}

.designer-link.thangs:hover,
.profile-designer .designer-link.thangs:hover,
.profile-social-bio .designer-link.thangs:hover {
    background: rgba(156, 39, 176, 0.2) !important;
    color: #9c27b0 !important;
    border-color: #9c27b0 !important;
}

.designer-link.patreon:hover,
.profile-designer .designer-link.patreon:hover,
.profile-social-bio .designer-link.patreon:hover {
    background: rgba(255, 66, 77, 0.2) !important;
    color: #ff424d !important;
    border-color: #ff424d !important;
}

/* Bio Section */
.profile-bio-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.profile-bio-section h3 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-bio-section h3::before {
    content: '';
    width: 3px;
    height: 18px;
    background: #00bcd4;
    border-radius: 2px;
}

.profile-bio {
    font-size: 1rem;
    line-height: 1.6;
    color: #b0b0b0;
    margin: 0;
    white-space: pre-line;
    flex: 1;
}

/* MakerChips Section */
.profile-chips {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.profile-chips h2 {
    margin: 0 0 25px 0;
    font-size: 1.3rem;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-chips h2::before {
    content: '';
    width: 3px;
    height: 20px;
    background: #00bcd4;
    border-radius: 2px;
}

/* Empty State */
.empty-chips {
    text-align: center;
    padding: 60px 20px;
    color: #b0b0b0;
}

.empty-icon {
    margin-bottom: 20px;
}

.empty-icon img {
    width: 80px;
    height: 80px;
    opacity: 0.5;
}

.empty-chips h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #e0e0e0;
}

.empty-chips p {
    margin: 0 0 25px 0;
    font-size: 1rem;
    line-height: 1.5;
}

/* Enhanced Chips Grid for Profile - Matching Site Design */
.profile-chips .chips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 20px;
    justify-items: center;
}

.profile-chips .chip-card {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    position: relative;
    backdrop-filter: blur(10px);
    cursor: pointer;
    max-width: 200px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.profile-chips .chip-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 188, 212, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.profile-chips .chip-image {
    position: relative;
    height: 100px;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    width: 100px;
    margin: 0 auto 10px auto;
}

.profile-chips .chip-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.profile-chips .chip-card:hover .chip-image img {
    transform: scale(1.25);
}

.profile-chips .chip-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #00bcd4;
    font-size: 2.5rem;
    opacity: 0.5;
    width: 100%;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border-radius: 50%;
}

.profile-chips .chip-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.profile-chips .chip-title {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #e0e0e0;
    line-height: 1.3;
}

.profile-chips .chip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    justify-content: center;
}

.profile-chips .chip-meta-item {
    font-size: 0.75rem;
    color: #b0b0b0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.profile-chips .chip-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #888;
    margin-top: auto;
}

.profile-chips .chip-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-header {
        padding: 20px;
    }
    
    .profile-header-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }
    
    .profile-username {
        font-size: 1.8rem;
    }
    
    .profile-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .profile-stat {
        padding: 10px 12px;
        min-width: 70px;
    }
    
    .profile-social-bio {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .social-links {
        justify-content: center;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .social-link {
        min-width: 140px;
        flex: 1;
        max-width: 200px;
    }
    
    .designer-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .designer-link {
        min-width: 140px;
        flex: 1;
        max-width: 200px;
    }
    
    .profile-social,
    .profile-designer,
    .profile-bio-section,
    .profile-chips {
        padding: 20px;
    }
    
    .profile-chips .chips-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .profile-page {
        padding: 10px;
    }
    
    .profile-header {
        padding: 15px;
    }
    
    .profile-stats {
        gap: 10px;
    }
    
    .profile-stat {
        padding: 8px 10px;
        min-width: 60px;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .profile-chips .chips-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}
