/* profile/style.css */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;700&display=swap');

/* Basic setup */
body.profile {
    padding: 0;
    /* Override global centering so profile uses its own layout */
    display: block;
    align-items: initial;
    justify-content: initial;
}

.profile .layout-wrapper {
    /* Use global standardized layout from style.css */
    /* Profile specific: align items to top */
    align-items: flex-start !important;
}

.profile .sidebar {
    /* Use global standardized sidebar styling from style.css */
    flex-shrink: 0;
}

.profile .container {
    /* Use global standardized container styling from style.css */
    /* Profile specific adjustments */
    flex-grow: 1;
    min-width: 0;
    justify-content: flex-start;
    align-items: flex-start; /* Align to top */
}

.profile .main-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    max-width: 100%; /* Use full container width */
    padding: 0 20px;
}

/* Profile Header - Skeuomorphic Card */
.profile-header {
    background: linear-gradient(to bottom, #f9f9f9, #e0e0e0);
    border-radius: 8px;
    border: 1px solid #b0b0b0;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    width: 100%; /* Full width */
    position: relative; /* create stacking context */
    z-index: 2; /* above banner base */
    overflow: visible; /* allow avatar to overlap */
}

.profile-banner {
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 7px 7px 0 0;
    border-bottom: 1px solid #b0b0b0;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.15);
    position: relative; /* Needed for sticker positioning */
    width: 100%; /* Full width */
    touch-action: none; /* allow pointer events to move stickers on touch */
    z-index: 1; /* sits behind header content */
}

.profile-header-content {
    display: flex;
    flex-direction: column; /* stack top-to-bottom */
    align-items: center; /* center content horizontally */
    text-align: center; /* center text for stacked layout */
    padding: 0 20px 20px;
    margin-top: -65px; /* Pulls content up to overlap with banner for avatar */
    position: relative;
    z-index: 3;
}

.avatar-container {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 5px solid #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    flex-shrink: 0;
    background-color: #f0f0f0;
    position: relative;
    z-index: 3; /* above banner and header surface */
}
.presence-dot { position:absolute; right:-4px; bottom:-4px; width:14px; height:14px; border-radius:50%; border:2px solid #fff; box-shadow:0 0 0 1px rgba(0,0,0,.15); }
.presence-online { background:#2ecc71; }
.presence-offline { background:#bdc3c7; }

#profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-details {
    flex-grow: 1;
    text-align: center; /* center details in vertical layout */
    margin-bottom: 15px;
}

#profile-username {
    font-size: 2.2rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 5px 0;
    text-shadow: 0 1px 1px #fff;
}

.profile-stats {
    display: flex;
    gap: 12px;
    justify-content: center; /* center stats row */
    color: #555;
    font-size: 1rem;
}

.profile-actions {
    display: flex;
    gap: 10px;
    justify-content: center; /* center action buttons */
    position: relative;
    z-index: 3; /* buttons above overlapping avatar */
}

/* Skeuomorphic Button Style */
.action-btn {
    padding: 8px 20px;
    font-family: 'Baloo 2', cursive;
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
    border: 1px solid #b0b0b0;
    border-radius: 6px;
    background: linear-gradient(to bottom, #fdfdfd, #dcdcdc);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.1s ease-in-out;
}
.action-btn:hover {
    background: linear-gradient(to bottom, #ffffff, #e8e8e8);
}
.action-btn:active {
    background: linear-gradient(to top, #fdfdfd, #dcdcdc);
    box-shadow: inset 0 2px 3px rgba(0,0,0,0.1);
}

.action-btn.following {
    background: linear-gradient(to bottom, #6c757d, #495057);
    color: white;
    text-shadow: 0 1px 0 rgba(0,0,0,0.3);
    border-color: #495057;
}

.action-btn.following:hover {
    background: linear-gradient(to bottom, #7a8288, #5a6268);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* General Content Container */
.skeu-container {
    background: linear-gradient(to bottom, #f5f5f5, #d8d8d8);
    border: 1px solid #b0b0b0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    width: 100%; /* Full width */
    box-sizing: border-box;
}

.skeu-container h2, .skeu-container h3 {
    font-weight: 700;
    color: #444;
    margin: 0 0 15px 0;
    text-shadow: 0 1px 1px #fff;
}
.skeu-container p {
    color: #666;
    margin-top: -10px;
    margin-bottom: 15px;
}

/* Sticker Inventory */
.sticker-inventory {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    background-color: rgba(0,0,0,0.05);
    padding: 10px;
    border-radius: 6px;
    min-height: 80px;
    width: 100%; /* Full width */
    box-sizing: border-box;
}
.inventory-sticker {
    width: 60px;
    height: 60px;
    object-fit: contain;
    cursor: grab;
    transition: transform 0.2s;
}
.inventory-sticker:hover {
    transform: scale(1.1);
}

/* XP Bar */
.xp-bar-container {
    width: 100%;
    position: relative;
    margin-bottom: 10px;
}

.xp-bar-container > div {
    width: 100%;
    height: 30px;
    border-radius: 15px;
    background-color: #C0C0C0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    padding: 4px;
    box-sizing: border-box;
}

#xp-bar {
    height: 100%;
    border-radius: 11px;
    background: linear-gradient(to right, #6abf69, #a5d6a7);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.5);
    transition: width 0.3s ease;
}

#xp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #1a1a1a;
    font-weight: bold;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 2;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.sticker-inventory-container {
    display: none; /* Hidden by default */
    margin-top: 20px;
}

.edit-mode .sticker-inventory-container {
    display: block; /* Shown only in edit mode */
}

.project-card {
    background: #fdfdfd;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 12px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    display: flex;            /* Vertical card contents */
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.project-thumbnail {
    width: 100%;
    max-width: 260px;
    height: 140px;
    background-color: #e8e8e8;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #ccc;
    box-shadow: inset 0 2px 3px rgba(0,0,0,0.1);
}
.project-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

/* Placed Stickers */
.placed-sticker {
    position: absolute;
    width: 80px;
    height: 80px;
    object-fit: contain;
    cursor: grab;
    user-select: none; /* Prevents selecting image while dragging */
    pointer-events: auto; /* ensure stickers can receive pointer events */
    z-index: 2; /* above banner artwork */
    transition: transform 0.2s ease, filter 0.2s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.placed-sticker:active {
    cursor: grabbing;
}

.placed-sticker:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Sticker dragging effects */
.placed-sticker.dragging {
    transform: scale(1.1) rotate(2deg);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4)) brightness(1.1);
    z-index: 1000;
}

@keyframes placeStickerAnim {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
    60% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
    80% {
        transform: translate(-50%, -50%) scale(0.9) rotate(-4deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

.sticker-placed {
    animation: placeStickerAnim 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Quote Section */
.quote-section {
    margin-bottom: 20px;
}

.quote-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.quote-text {
    font-style: italic;
    color: #666;
    font-size: 1.1rem;
    line-height: 1.5;
    flex: 1;
    text-align: center;
    padding: 10px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.edit-quote-btn {
    background: linear-gradient(145deg, #007bff, #0056b3);
    border: 2px solid #004085;
    border-radius: 8px;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 4px rgba(0, 123, 255, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.edit-quote-btn:hover {
    background: linear-gradient(145deg, #0056b3, #004085);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 8px rgba(0, 123, 255, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Social Section */
.social-section {
    margin-bottom: 20px;
}

.social-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 15px;
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
    border-radius: 8px;
    padding: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #495057;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.social-tab:hover {
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
    transform: translateY(-1px);
}

.social-tab.active {
    background: linear-gradient(145deg, #007bff, #0056b3);
    color: white;
    border-color: #004085;
    box-shadow: 
        0 4px 8px rgba(0, 123, 255, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.tab-icon {
    font-size: 1.1rem;
}

.tab-text {
    font-size: 0.9rem;
}

.tab-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.social-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.4);
}

.social-content {
    position: relative;
}

.social-list {
    display: none;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-list.active {
    display: flex;
}

.social-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.05),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.social-user:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.social-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.social-username {
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
}

.social-user-stats {
    font-size: 0.8rem;
    color: #6c757d;
}

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

.social-action-btn {
    padding: 6px 12px;
    background: linear-gradient(145deg, #007bff, #0056b3);
    border: 1px solid #004085;
    border-radius: 4px;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 4px rgba(0, 123, 255, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.social-action-btn:hover {
    background: linear-gradient(145deg, #0056b3, #004085);
    transform: translateY(-1px);
}

.social-action-btn.secondary {
    background: linear-gradient(145deg, #6c757d, #545b62);
    border-color: #4e555b;
}

.social-action-btn.secondary:hover {
    background: linear-gradient(145deg, #545b62, #4e555b);
}

.empty-social {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 30px;
}

/* Reputation Section */
.reputation-section {
    margin-bottom: 20px;
}

.reputation-section h3 {
    font-size: 1.3rem;
    color: #374151;
    margin-bottom: 15px;
}

.reputation-display {
    display: flex;
    gap: 20px;
    justify-content: space-around;
}

.reputation-score,
.trust-level {
    text-align: center;
    padding: 15px;
    background: linear-gradient(145deg, #f9fafb, #f3f4f6);
    border-radius: 12px;
    flex: 1;
}

.score-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 5px;
}

.score-label {
    display: block;
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
}

.trust-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.trust-badge.newcomer {
    background: linear-gradient(145deg, #e5e7eb, #d1d5db);
    color: #6b7280;
}

.trust-badge.member {
    background: linear-gradient(145deg, #dbeafe, #bfdbfe);
    color: #2563eb;
}

.trust-badge.trusted {
    background: linear-gradient(145deg, #a7f3d0, #6ee7b7);
    color: #059669;
}

.trust-badge.veteran {
    background: linear-gradient(145deg, #fde68a, #fbbf24);
    color: #d97706;
}

.trust-badge.elite {
    background: linear-gradient(145deg, #fbbf24, #f59e0b);
    color: #78350f;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.trust-label {
    display: block;
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 600;
}
