/* Profile page specific styles */

.profile-page-wrapper {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.profile-page-card {
    background: var(--bg-card);
    border-radius: 1.5rem;
    padding: 1.75rem 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.profile-page-card::before {
    content: '';
    position: absolute;
    inset: 0;
    /*background: radial-gradient(circle at 120% -20%, rgba(255, 255, 255, 0.08), transparent 55%);*/
    pointer-events: none;
}

.profile-page-header {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    position: relative;
    z-index: 1;
}

.profile-page-avatar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.profile-page-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #8b47eb;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.55);
    border: 3px solid rgba(255, 255, 255, 0.18);
    overflow: hidden;
}

.profile-page-avatar.discord-avatar {
    background: #5865F2;
}

.profile-page-avatar.has-image {
    background: transparent;
}

.profile-page-avatar-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
}

.profile-page-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.profile-page-avatar-img.is-visible {
    display: block;
}

.profile-page-avatar-edit-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.profile-page-avatar-edit-btn i {
    font-size: 0.8rem;
}

.profile-page-main {
    flex: 1;
}

/* Admin Reports Section */
.admin-section {
    background: var(--bg-card);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
}

.admin-section.hidden {
    display: none;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-header h2 {
    font-size: 1.5rem;
    color: #ff6b6b;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.admin-actions {
    display: flex;
    gap: 1rem;
}

.btn-admin-action {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-admin-action:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-admin-action.btn-danger {
    background: rgba(255, 50, 50, 0.2);
    color: #ff6b6b;
}

.btn-admin-action.btn-danger:hover {
    background: rgba(255, 50, 50, 0.3);
}

.reports-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.report-card {
    background: var(--bg-card-header);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.report-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.report-lesson {
    color: #7867c5;
    font-weight: 600;
}

.report-content {
    margin-bottom: 1rem;
}

.report-description {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    color: white;
}

.report-details {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    display: grid;
    gap: 0.5rem;
}

.report-detail-row {
    display: flex;
    gap: 0.5rem;
}

.report-label {
    color: rgba(255, 255, 255, 0.5);
    min-width: 80px;
}

.report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.btn-report-action {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-report-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-report-action.delete:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.profile-page-name-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
}

.profile-page-logout-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0.5rem;
}

.profile-page-logout-btn:hover {
    color: #ff6b6b;
}

.profile-page-logout-btn i {
    font-size: 1rem;
}

.profile-page-username {
    font-size: 1.6rem;
    font-weight: 700;
}

.profile-page-username-edit-btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.profile-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.profile-page-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.profile-page-meta i {
    font-size: 0.9rem;
    opacity: 0.85;
}

.profile-page-divider {
    height: 1px;
    margin-top: 0.5rem;
    background-color: var(--border-color);
}

/* XP and Level Section */
.profile-page-xp-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.profile-xp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.profile-level-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, hsl(262, 60%, 55%), hsl(262, 60%, 45%));
    border-radius: 2rem;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(139, 71, 235, 0.3);
}

.profile-level-badge i {
    color: #ffffff; /* Use white for the star icon */
}

.profile-xp-text {
    font-size: 0.95rem;
    color: hsl(216, 10%, 70%);
    font-weight: 500;
}

.profile-xp-bar {
    width: 100%;
    height: 1rem;
    background: var(--bg-secondary);
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
}

.profile-xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, hsl(262, 60%, 55%), hsl(262, 60%, 65%));
    border-radius: 1rem;
    transition: width 0.8s ease;
    box-shadow: 0 0 10px rgba(139, 71, 235, 0.5);
}

.profile-page-subrow {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.profile-page-subrow.button-group {
    margin-top: 1.5rem;
}

.profile-page-subrow.button-group .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none; /* Ensure no underline */
    border-radius: 0.5rem;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.profile-page-subrow.button-group #link-discord-btn {
    background-color: var(--color-accent);
    color: white;
}

.profile-page-subrow.button-group #link-discord-btn:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
}

.profile-page-subrow.button-group #join-discord-btn {
    background-color: var(--color-btn-gray);
    color: var(--color-text-secondary);
}

.profile-page-subrow.button-group #join-discord-btn:hover {
    background-color: var(--color-btn-gray-hover);
    color: white;
    transform: translateY(-2px);
}


.profile-page-elo-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    font-weight: 600;
}

.profile-page-elo-pill span {
    opacity: 0.9;
}

.profile-page-elo-pill i {
    color: #ffd66b;
}

.profile-page-subtext {
    font-size: 0.85rem;
    opacity: 0.9;
}

.button-group {
    justify-content: flex-start;
    gap: 1rem;
}

.profile-page-content-row {
    margin-top: 1.75rem;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1.5rem;
}

.profile-page-content-card {
    background: hsl(216, 15%, 20%);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.profile-page-content-card h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.profile-page-placeholder-text {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.profile-page-empty-state {
    scale: 1.2;
    text-align: center;
    padding: 4rem 2rem;
}

.profile-page-empty-state h2 {
    margin-bottom: 0.75rem;
}

.profile-page-empty-state p {
    color: var(--color-text-secondary);
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.profile-page-empty-actions {
    display:grid;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-page-empty-actions .btn {
    text-decoration: none;
    padding: 12px 50px;
}

@media (max-width: 768px) {
    .profile-page-wrapper {
        padding-inline: 0.75rem;
    }

    .profile-page-card {
        padding: 1.4rem 1.25rem 1.25rem;
    }

    .profile-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-page-avatar {
        width: 96px;
        height: 96px;
    }

    .profile-page-username {
        font-size: 1.4rem;
    }

    .profile-page-content-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-page-empty-state {
        padding-inline: 1rem;
    }
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: hsl(216, 15%, 22%);
    border-radius: 1.25rem;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
}

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.modal-step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #8b47eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(139, 71, 235, 0.3);
}

.modal-step-text p {
    margin: 0;
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.modal-step-text p:first-child {
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.btn-secondary {
    background-color: var(--color-btn-gray);
    color: var(--color-text-secondary);
}

.btn-secondary:hover {
    background-color: var(--color-btn-gray-hover);
    color: white;
}

.code-block {
    background: hsl(216, 15%, 15%);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

.modal-input-group {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.modal-input-group input {
    flex: 1;
    background: hsl(216, 15%, 18%);
    border: 1px solid hsl(216, 15%, 35%);
    border-radius: 0.5rem;
    padding: 0.75rem;
    color: white;
    font-size: 1rem;
}

.modal-input-group input:focus {
    outline: none;
    border-color: #8b47eb;
    box-shadow: 0 0 0 3px rgba(139, 71, 235, 0.3);
}

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
    color: white;
}

.modal-icon.success-icon {
    background-color: hsl(140, 60%, 50%);
    box-shadow: 0 0 20px hsla(140, 60%, 50%, 0.5);
}

.modal-icon.error-icon {
    background-color: hsl(0, 70%, 50%);
    box-shadow: 0 0 20px hsla(0, 70%, 50%, 0.5);
}


.modal-subtext {
    color: var(--color-text-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-button-group {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-danger {
    background-color: hsl(0, 70%, 50%);
    color: white;
}

.btn-danger:hover {
    background-color: hsl(0, 70%, 40%);
}


/* --- Skeleton Loader Styles --- */
.is-loading .skeleton-text {
    color: transparent !important;
    user-select: none;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.is-loading .skeleton-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(90deg, transparent, hsla(0,0%,100%,.05), transparent);
    animation: skeleton-shimmer 1.5s infinite;
}

.is-loading .profile-page-username,
.is-loading .profile-page-meta span {
    min-height: 1em;
    width: 60%;
    display: inline-block;
}

.is-loading .profile-page-meta span {
    width: 40%;
}

.is-loading .profile-page-avatar {
    animation: skeleton-shimmer 1.5s infinite;
    background-image: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-card) 50%, var(--bg-secondary) 100%);
    background-size: 200% 100%;
}

/* PFP Upload Styles */
.pfp-upload-container {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin: 1.5rem 0;
    background: rgba(255, 255, 255, 0.03);
}

.pfp-upload-container:hover, .pfp-upload-container.drag-over {
    border-color: #8b47eb;
    background: rgba(139, 71, 235, 0.05);
}

.pfp-upload-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pfp-upload-preview i {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.3);
}

.pfp-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-button-group {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.modal-input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
}
