/* Profile Page Styles - Berserk Dark Theme */
 
.profile-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}
 
.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 40px;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.1), rgba(220, 20, 60, 0.1));
    border: 2px solid var(--blood-red);
    border-radius: 12px;
    margin-bottom: 30px;
}
 
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blood-red), var(--crimson));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    font-weight: 700;
    border: 4px solid var(--border-color);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.5);
}
 
.profile-info {
    flex: 1;
}
 
.profile-username {
    font-size: 36px;
    font-weight: 700;
    color: var(--crimson);
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}
 
.profile-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: #888;
    font-size: 14px;
}
 
.profile-stats span {
    padding: 6px 12px;
    background: rgba(139, 0, 0, 0.1);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
}
 
.btn-profile-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: linear-gradient(135deg, var(--blood-red), var(--crimson));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}
 
.btn-profile-action:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}
 
.btn-profile-action--secondary {
    background: rgba(139, 0, 0, 0.15);
    border: 1px solid var(--blood-red);
    color: var(--crimson);
}
 
.btn-profile-action--secondary:hover {
    background: rgba(139, 0, 0, 0.28);
    opacity: 1;
}
 
.profile-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
 
/* ── Two-row profile layout ──────────────────────────────────────────────
   .profile-content simply stacks the two rows. Each row is its own grid
   with the same 5fr/7fr column split, so the columns still line up
   visually even though they're no longer a single grid. */
.profile-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
 
/* Top row: Recent Updates (left) + Profile Wall (right).
   align-items: stretch (the grid default) makes both cards exactly the
   same height — whichever card's content is naturally taller sets the
   row height, and the other card's box stretches to match it. */
.profile-top-row {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 30px;
    align-items: stretch;
}
 
/* The two matched cards become flex columns so their internal scroll
   areas (.profile-posts-scroll / .comments-list) can grow to fill
   whatever height the stretch above gives them, instead of leaving
   empty space. */
.profile-top-row .profile-card--matched {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}
 
/* Bottom row: About Me + Pet (left), Top Friends + Recent Visitors (right).
   align-items: start, same as the original layout — these cards are not
   height-matched, they just stack naturally per column. */
.profile-bottom-row {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 30px;
    align-items: start;
}
 
.profile-full-width-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
}
 
.profile-card {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
}
 
.card-title {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--crimson);
    margin-bottom: 20px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 0 10px rgba(220, 20, 60, 0.3);
}
 
.about-content {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 15px;
}
 
/* Profile Achievements */
.profile-achievements {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}
 
.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(139, 0, 0, 0.05);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: help;
}
 
.achievement-badge:hover {
    background: rgba(139, 0, 0, 0.1);
    border-color: var(--crimson);
}
 
.achievement-emoji {
    font-size: 32px;
}
 
.achievement-name-small {
    color: var(--text-color);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}
 
/* Profile Gifts */
.profile-gifts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
 
.gift-display-item {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 0, 0, 0.05);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: help;
    transition: all 0.2s ease;
}
 
.gift-display-item:hover {
    transform: scale(1.1);
    border-color: var(--crimson);
}
 
.gift-emoji-profile {
    font-size: 32px;
}
 
/* Pet Display */
.pet-display {
    display: flex;
    gap: 20px;
    align-items: center;
}
 
.pet-sprite-large {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
}
.pet-sprite-large img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
 
.pet-info h3 {
    color: var(--text-color);
    font-size: 20px;
    margin-bottom: 5px;
}
 
.pet-type {
    color: var(--crimson);
    font-size: 14px;
    margin-bottom: 5px;
}
 
.pet-ecosystem {
    color: #888;
    font-size: 13px;
    margin-bottom: 15px;
}
 
.pet-stats-mini {
    margin-top: 15px;
}
 
.stat-bar {
    margin-bottom: 10px;
}
 
.stat-bar span:first-child {
    display: inline-block;
    width: 80px;
    color: #888;
    font-size: 12px;
}
 
.bar {
    display: inline-block;
    width: 150px;
    height: 8px;
    background: rgba(139, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    vertical-align: middle;
    margin: 0 10px;
}
 
.fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blood-red), var(--crimson));
    transition: width 0.3s ease;
}
 
.fill.happy {
    background: linear-gradient(90deg, #4ade80, #22c55e);
}
 
.pet-dead {
    text-align: center;
    padding: 20px;
}
 
/* Visitors */
.visitors-list {
    max-height: 400px;
    overflow-y: auto;
}
 
.visitor-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}
 
.visitor-item:hover {
    background: rgba(139, 0, 0, 0.05);
}
 
.visitor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blood-red), var(--crimson));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}
 
.visitor-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
 
.visitor-name {
    color: var(--text-color);
    font-weight: 600;
    text-decoration: none;
}
 
.visitor-name:hover {
    color: var(--crimson);
}
 
.visitor-time {
    color: #666;
    font-size: 12px;
}
 
/* Profile Wall */
.comment-form {
    margin-bottom: 30px;
}
 
.comment-form textarea {
    width: 100%;
    padding: 12px;
    background: var(--dark-gray);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-family: inherit;
    resize: vertical;
    margin-bottom: 10px;
}
 
.comment-form textarea:focus {
    outline: none;
    border-color: var(--blood-red);
}
 
.btn-post-comment {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--blood-red), var(--crimson));
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}
 
.btn-post-comment:hover {
    transform: translateY(-2px);
}
 
.wall-comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}
 
/* Comments list fills the remaining height of the matched-height Profile
   Wall card and scrolls internally (was: max-height: 600px fixed). */
.comments-list {
    flex: 1 1 auto;
    max-height: 420px;
    min-height: 0;
    overflow-y: auto;
}
 
.comment-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}
 
.comment-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blood-red), var(--crimson));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}
 
.comment-content {
    flex: 1;
}
 
.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
 
.comment-author {
    color: var(--crimson);
    font-weight: 700;
    text-decoration: none;
}
 
.comment-author:hover {
    text-decoration: underline;
}
 
.comment-time {
    color: #666;
    font-size: 12px;
}
 
.comment-text {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 10px;
}
 
.btn-delete-comment {
    padding: 4px 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}
 
.btn-delete-comment:hover {
    background: rgba(239, 68, 68, 0.2);
}
 
.comment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}
 
.btn-react-comment {
    background: transparent;
    border: 1px solid #2a0040;
    border-radius: 20px;
    color: #888;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 10px;
    transition: border-color 0.2s, color 0.2s;
}
 
.btn-react-comment:hover,
.btn-react-comment.reacted {
    border-color: var(--blood-red);
    color: #ef4444;
}
 
.btn-toggle-reply,
.btn-cancel-reply {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    transition: color 0.2s;
}
 
.btn-toggle-reply:hover { color: var(--crimson); }
 
/* ── Replies ── */
.comment-replies {
    margin-top: 10px;
    padding-left: 20px;
    border-left: 2px solid #1a0030;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
 
.reply-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
 
.reply-content {
    flex: 1;
}
 
.reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}
 
.reply-author {
    font-weight: 600;
    font-size: 13px;
    color: var(--crimson);
    text-decoration: none;
}
 
.reply-author:hover { text-decoration: underline; }
 
.reply-time {
    font-size: 11px;
    color: #555;
}
 
.reply-text {
    font-size: 13px;
    color: #ccc;
    line-height: 1.4;
}
 
.btn-delete-reply {
    background: transparent;
    border: 1px solid transparent;
    color: #555;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 6px;
    margin-top: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
 
.btn-delete-reply:hover {
    color: #ef4444;
    border-color: rgba(239,68,68,0.3);
    background: rgba(239,68,68,0.08);
}
 
/* ── Reply form ── */
.reply-form {
    margin-top: 8px;
    padding-left: 20px;
}
 
.reply-form textarea {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid #2a0040;
    border-radius: 8px;
    color: #ccc;
    font-size: 13px;
    padding: 8px;
    resize: vertical;
    box-sizing: border-box;
}
 
.reply-form textarea:focus {
    border-color: var(--blood-red);
    outline: none;
}
 
.btn-post-reply {
    margin-top: 6px;
    padding: 5px 16px;
    background: linear-gradient(135deg, var(--blood-red), var(--crimson));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: opacity 0.2s;
}
 
.btn-post-reply:hover { opacity: 0.85; }
 
.react-count-static {
    font-size: 13px;
    color: #666;
}
 
/* Edit Profile */
.profile-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
 
.profile-edit-header h1 {
    font-family: 'Courier New', monospace;
    font-size: 32px;
    color: var(--crimson);
}
 
.btn-back {
    padding: 10px 20px;
    background: rgba(139, 0, 0, 0.1);
    color: var(--crimson);
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-weight: 600;
}
 
.edit-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
}
 
.form-group {
    margin-bottom: 25px;
}
 
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 600;
}
 
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    background: var(--dark-gray);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-family: inherit;
}
 
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--blood-red);
}
 
.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 13px;
}
 
.btn-save {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--blood-red), var(--crimson));
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}
 
.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.5);
}
 
/* Mobile Responsive */
@media (max-width: 1024px) {
    .profile-top-row,
    .profile-bottom-row {
        grid-template-columns: 1fr;
    }
 
    .profile-top-row {
        align-items: start; /* don't force equal height once stacked into one column */
    }
}
 
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
 
    .profile-username {
        font-size: 24px;
    }
 
    .profile-stats {
        justify-content: center;
    }
 
    .pet-display {
        flex-direction: column;
        text-align: center;
    }
}
 
/* Top Friends Display on Profile */
.top-friends-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}
 
.top-friend-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(139, 0, 0, 0.05);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}
 
.top-friend-mini:hover {
    background: rgba(139, 0, 0, 0.1);
    transform: translateY(-3px);
}
 
.friend-avatar-mini {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blood-red), var(--crimson));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
}
 
.friend-name-mini {
    color: var(--text-color);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}
 
.btn-edit-top-friends {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(139, 0, 0, 0.12);
    color: var(--crimson);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--blood-red);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
    margin-top: 12px;
}
 
.btn-edit-top-friends:hover {
    background: rgba(139, 0, 0, 0.25);
    border-color: var(--crimson);
}
 
/* Profile Status Updates */
.profile-statuses {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}
 
.profile-status-item {
    padding: 15px;
    background: rgba(139, 0, 0, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--crimson);
}
 
.status-text {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 14px;
}
 
.status-meta {
    display: flex;
    gap: 15px;
    color: #888;
    font-size: 12px;
}
 
.status-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
 
.btn-view-all {
    display: block;
    text-align: center;
    padding: 10px;
    color: var(--crimson);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}
 
.btn-view-all:hover {
    text-decoration: underline;
}
 
.mood-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}
 
.mood-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    background: rgba(139, 0, 0, 0.1);
    border: 2px solid var(--blood-red);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 12px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
 
.mood-option:hover {
    background: rgba(139, 0, 0, 0.25);
    border-color: var(--crimson);
    color: var(--crimson);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.4);
}
 
.mood-option.active {
    background: rgba(139, 0, 0, 0.35);
    border-color: var(--crimson);
    color: var(--crimson);
    box-shadow: 0 0 14px rgba(220, 20, 60, 0.5);
}
 
.mood-option.active::after {
    content: '▶';
    font-size: 9px;
    color: var(--crimson);
}
 
.mood-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: brightness(0.85);
    transition: filter 0.2s;
}
 
.mood-option:hover .mood-icon,
.mood-option.active .mood-icon {
    filter: brightness(1.2);
}
