/* Profile Specific Styles */

/* Loading State */
.loading-overlay {
    text-align: center;
    padding: 4rem;
    color: var(--text-secondary);
}

.profile-surface {
    /* background: var(--profile-surface-bg); removed */
    border-radius: var(--radius-card);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    overflow: hidden;
}

#main-profile-view.profile-surface {
    padding: 0;
}


#main-profile-view.profile-surface .profile-header {
    padding-left: var(--app-gutter);
    padding-right: var(--app-gutter);
}

#main-profile-view.profile-surface .profile-banner {
    margin-left: calc(var(--app-gutter) * -1);
    margin-right: calc(var(--app-gutter) * -1);
    width: calc(100% + (var(--app-gutter) * 2));
}

#settings-view.profile-surface {
    padding: var(--app-section-gap);
}

#settings-view.profile-surface .profile-content {
    padding-bottom: 0;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.profile-header {
    padding-top: 0;
    text-align: left;
    position: relative;
    /* max-width and margin handled by app-shell */
}

.profile-header:not(.settings-mode) {
    --profile-banner-text-primary: var(--text-primary);
    --profile-banner-text-secondary: var(--text-secondary);
    --profile-banner-text-tertiary: var(--text-tertiary);
    --profile-banner-text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
    --profile-banner-pill-bg: rgba(255, 255, 255, 0.1);
    --profile-banner-pill-border: rgba(255, 255, 255, 0.12);
}

.profile-header:not(.settings-mode)[data-banner-tone="light"] {
    --profile-banner-text-primary: rgba(0, 0, 0, 0.92);
    --profile-banner-text-secondary: rgba(0, 0, 0, 0.72);
    --profile-banner-text-tertiary: rgba(0, 0, 0, 0.58);
    --profile-banner-text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
    --profile-banner-pill-bg: rgba(0, 0, 0, 0.06);
    --profile-banner-pill-border: rgba(0, 0, 0, 0.1);
}

.profile-header.settings-mode {
    padding-bottom: 0;
}

.profile-banner {
    height: 300px;
    width: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: var(--radius-card) var(--radius-card) var(--radius-card) var(--radius-card);
}

.profile-main-info {
    display: flex;
    align-items: flex-start;
    margin-top: -258px;
    position: relative;
    z-index: 2;
    margin-bottom: 2rem;
    margin-right: 4rem;
    height: 220px;
}

.profile-actions {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.profile-header:not(.settings-mode) .profile-actions .btn {
    text-shadow: var(--profile-banner-text-shadow);
}

.profile-header:not(.settings-mode) .profile-actions .btn-secondary {
    background: rgba(0, 0, 0, 0.28);
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(calc(var(--glass-blur) * 0.9)) saturate(1.2);
    -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 0.9)) saturate(1.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.profile-header:not(.settings-mode) .profile-actions .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.34);
    border-color: rgba(255, 255, 255, 0.18);
}

.profile-header:not(.settings-mode)[data-banner-tone="light"] .profile-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.62);
    border-color: rgba(0, 0, 0, 0.14);
    color: rgba(0, 0, 0, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.profile-header:not(.settings-mode)[data-banner-tone="light"] .profile-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.74);
    border-color: rgba(0, 0, 0, 0.18);
}

/* Settings Form */
.settings-content {
    width: 100%;
}

.settings-content .access-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-family: inherit;
}

.form-textarea {
    min-height: 120px;
}

.preview-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #333;
}

.banner-preview {
    width: 100%;
    height: 100px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: #333;
    margin-bottom: 0.5rem;
}

.remove-btn {
    background-color: rgba(255, 107, 107, 0.2) !important;
    border-color: rgba(255, 107, 107, 0.3) !important;
    color: #ff6b6b !important;
    display: none;
}

.error-msg {
    color: #ff6b6b;
    margin-bottom: 1rem;
    display: none;
}

.settings-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-flex-1 {
    flex: 1;
    text-align: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    margin: 0;
    margin-left: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.edit-profile-btn {
    position: absolute;
    top: 160px;
    /* Position it relative to the banner bottom roughly */
    right: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 1.2rem;
    z-index: 2;
}

.edit-profile-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: rotate(90deg);
}

.profile-identity {
    margin-left: 1.5rem;
    flex: 1;
    min-width: 0;
    /* Enable text truncation if needed */
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0;
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
}

.profile-header:not(.settings-mode) .profile-name {
    color: var(--profile-banner-text-primary);
    text-shadow: var(--profile-banner-text-shadow);
}

.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--profile-banner-pill-bg, rgba(255, 255, 255, 0.1));
    border: 1px solid var(--profile-banner-pill-border, rgba(255, 255, 255, 0.1));
    white-space: nowrap;
}

.profile-status.hidden {
    display: none;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-tertiary);
}

.profile-header:not(.settings-mode)[data-banner-tone="light"] .status-dot:not(.online) {
    background-color: rgba(0, 0, 0, 0.55);
}

.status-dot.online {
    background-color: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}

.profile-header:not(.settings-mode)[data-banner-tone="light"] .status-dot.online {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12), 0 0 8px rgba(74, 222, 128, 0.4);
}

.status-text {
    color: var(--text-secondary);
}

.profile-handle {
    color: var(--accent-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.profile-bio {
    color: var(--text-secondary);
    margin: 0.5rem 0 0 0;
    line-height: 1.5;
    max-width: 600px;
    margin-bottom: 20px;
}

.profile-header:not(.settings-mode) .profile-handle,
.profile-header:not(.settings-mode) .status-text,
.profile-header:not(.settings-mode) .profile-bio {
    color: var(--profile-banner-text-secondary);
    text-shadow: var(--profile-banner-text-shadow);
}

.profile-header:not(.settings-mode) .profile-handle {
    color: var(--accent-primary);
}

.profile-header:not(.settings-mode)[data-banner-tone="light"] .profile-handle {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.profile-stats {
    margin-bottom: 1.5rem;
    padding: 1rem;
    /* Glass styling handled by .glass-card in HTML */
    display: block;
    /* Override default flex if needed, or just let div be div */
}

.stats-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stats-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 13px;
}

.stat-item {
    text-align: center;
    display: flex;
    align-items: center;
    border-radius: var(--radius-lg);
    padding: 0 12px;
    background-color: var(--profile-surface-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
}

.profile-header:not(.settings-mode) .stat-item {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(calc(var(--glass-blur) * 0.9)) saturate(1.2);
    -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 0.9)) saturate(1.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.profile-header:not(.settings-mode)[data-banner-tone="light"] .stat-item {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(0, 0, 0, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.stat-item.is-clickable {
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.stat-item.is-clickable:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

.profile-header:not(.settings-mode) .stat-item.is-clickable:hover {
    opacity: 0.9;
}

.stat-value {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-right: 10px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.profile-header:not(.settings-mode) .stat-value {
    color: var(--profile-banner-text-primary);
    text-shadow: var(--profile-banner-text-shadow);
}

.profile-header:not(.settings-mode) .stat-label {
    color: var(--profile-banner-text-tertiary);
    text-shadow: var(--profile-banner-text-shadow);
}

.profile-content {
    /* max-width and margin removed */
    padding-bottom: 4rem;
    /* side padding removed */
}

.profile-tabs {
    display: flex;
    gap: 2rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 2rem;
}

.profile-tabs-wrap {
    position: relative;
}

.profile-tab-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.tab-btn {
    padding: 1rem 0;
    color: var(--text-secondary);
    position: relative;
    cursor: pointer;
    font-weight: 500;
}

.tab-btn.active {
    color: var(--accent-primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
}

.tab-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.25);
    outline-offset: 6px;
    border-radius: 10px;
}

#profile-tab-activity:checked~.profile-tabs .tab-btn[for="profile-tab-activity"],
#profile-tab-posts:checked~.profile-tabs .tab-btn[for="profile-tab-posts"],
#profile-tab-domains:checked~.profile-tabs .tab-btn[for="profile-tab-domains"] {
    color: var(--accent-primary);
}

#profile-tab-activity:checked~.profile-tabs .tab-btn[for="profile-tab-activity"]::after,
#profile-tab-posts:checked~.profile-tabs .tab-btn[for="profile-tab-posts"]::after,
#profile-tab-domains:checked~.profile-tabs .tab-btn[for="profile-tab-domains"]::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
}

.profile-tab-panel {
    display: none;
}

#profile-tab-activity:checked~.profile-tab-panels .profile-tab-panel--activity {
    display: block;
}

#profile-tab-posts:checked~.profile-tab-panels .profile-tab-panel--posts {
    display: block;
}

#profile-tab-domains:checked~.profile-tab-panels .profile-tab-panel--domains {
    display: block;
}

.top-domains-card {
    max-width: 520px;
}

.profile-post-create {
    margin-bottom: 1rem;
    position: relative;
    z-index: 5;
    overflow: visible;
}

.md-cheatsheet {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.md-cheatsheet-trigger {
    border: 0;
    background: transparent;
    padding: 0 0.1rem;
    color: var(--text-tertiary);
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.2;
    cursor: help;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.md-cheatsheet-trigger:hover {
    color: var(--text-secondary);
}

.md-cheatsheet-trigger:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.25);
    outline-offset: 3px;
}

.md-cheatsheet-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 2000;
    width: min(360px, calc(100vw - 56px));
    padding: 12px 12px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(20, 20, 22, 0.96);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
    color: var(--text-secondary);
}

.md-cheatsheet:hover .md-cheatsheet-tooltip,
.md-cheatsheet:focus-within .md-cheatsheet-tooltip {
    display: block;
}

.md-cheatsheet-title {
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.md-cheatsheet-rows {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.md-cheatsheet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.md-cheatsheet-row code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    white-space: pre;
}

.profile-post-create .form-textarea {
    min-height: 140px;
    resize: vertical;
}

.profile-post-create-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

.profile-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.profile-post:not(.feed-item) {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.profile-post-meta-left,
.profile-post-meta-right {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.profile-post-meta-left {
    flex: 1;
}

.profile-post-author {
    color: var(--text-secondary);
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-post-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-size: cover;
    background-position: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
    flex: 0 0 auto;
}

.profile-post-delete {
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-tertiary);
    font-weight: 600;
    cursor: pointer;
}

.profile-post-delete:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.25);
    color: rgba(255, 107, 107, 0.95);
}

.profile-post-delete:disabled {
    opacity: 0.7;
    cursor: default;
}

.profile-post-time {
    white-space: nowrap;
}

.profile-post-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.profile-post-comments-link {
    margin-left: auto;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-tertiary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.profile-post-comments-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.md {
    color: var(--text-secondary);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.md p {
    margin: 0.65rem 0;
}

.md p:first-child {
    margin-top: 0;
}

.md p:last-child {
    margin-bottom: 0;
}

.md h1,
.md h2,
.md h3 {
    margin: 0.9rem 0 0.5rem;
    line-height: 1.25;
    color: var(--text-primary);
}

.md h1 {
    font-size: 1.25rem;
}

.md h2 {
    font-size: 1.1rem;
}

.md h3 {
    font-size: 1rem;
}

.md ul,
.md ol {
    margin: 0.65rem 0 0.65rem 1.25rem;
}

.md li + li {
    margin-top: 0.2rem;
}

.md a {
    color: var(--accent-primary);
    text-decoration: none;
}

.md a:hover {
    text-decoration: underline;
}

.md code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.92em;
    padding: 0.12em 0.35em;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.md pre {
    margin: 0.75rem 0;
    padding: 0.9rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: auto;
}

.md pre code {
    padding: 0;
    border: 0;
    background: transparent;
}

.md-omitted {
    color: var(--text-tertiary);
    font-style: italic;
}

.activity-item {
    /* Base styles handled by .glass-card */
}

.activity-item:hover {
    background: #8d8e9b0f;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.activity-context {
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-context a {
    color: var(--accent-primary);
}

.activity-time {
    color: var(--text-tertiary);
}

.activity-body {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    font-size: 0.95rem;
}

.activity-actions {
    display: flex;
    gap: 1.5rem;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

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

/* Color Picker */
.color-picker {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .profile-main-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -60px;
        margin-right: 1rem;
    }

    .profile-identity {
        margin-left: 0;
        margin-top: 0 !important;
    }

    .profile-actions {
        margin-left: 0 !important;
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }

    .profile-stats {
        justify-content: center;
    }

    .profile-bio {
        text-align: center;
        margin-bottom: 20px;
    }
}

/* Tooltip Styles */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    font-size: 10px;
    margin-left: 8px;
    cursor: help;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
    vertical-align: middle;
}

.info-icon:hover {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.info-icon::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 10px 14px;
    background: #1a1a1a;
    color: white;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 6px;
    white-space: normal;
    width: 260px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    z-index: 100;
    font-weight: normal;
}

.info-icon::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border-width: 6px;
    border-style: solid;
    border-color: #1a1a1a transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 100;
}

.info-icon:hover::before,
.info-icon:hover::after {
    opacity: 1;
    visibility: visible;
    margin-bottom: 8px;
    /* Slightly animate up */
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.checkbox-wrapper label {
    margin-bottom: 0;
    color: var(--text-primary);
    cursor: pointer;
}

.sub-options {
    margin-left: 1.7rem;
    margin-top: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-left: 2px solid var(--glass-border);
    padding-left: 0.75rem;
}

.sub-options.hidden {
    display: none;
}

/* Blacklist */
.blacklist-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
}

.blacklist-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.blacklist-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blacklist-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    color: #ff8787;
    border-radius: 999px;
    font-size: 0.85rem;
}

.blacklist-remove {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
}

.blacklist-remove:hover {
    opacity: 1;
}

/* Active Pages */
.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.active-pages-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.active-page-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    transition: background 0.2s;
}

.active-page-item:hover {
    background: var(--glass-bg-soft);
}

.active-page-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.active-page-domain {
    font-weight: 500;
    color: var(--text-primary);
}

.active-page-url {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.active-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.5rem;
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.active-dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Profile Status Indicator */
.profile-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-tertiary);
}

.status-dot.online {
    background-color: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.status-text {
    font-weight: 500;
}

/* Top Stats Section */
.top-stats-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.top-stats-col {
    border-radius: var(--radius-card);
    padding: 1rem;
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
}

.top-stats-col .section-title {
    margin-top: 0;
    font-size: 1rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.top-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.top-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.top-item-name {
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.top-item-name a {
    color: inherit;
    text-decoration: none;
}

.top-item-name a:hover {
    color: var(--accent-primary);
}

.top-item-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

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

/* Cropper Modal Styles */
.modal-content-lg {
    max-width: 600px;
    width: 90%;
}

.crop-container-style {
    height: 400px; /* Fixed height for cropperjs */
    background: #000;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: var(--radius-card);
    position: relative;
}

.modal-actions-right {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.img-fluid {
    max-width: 100%;
    display: block;
}
