/* Dashboard Specific Styles */

/* Map dashboard variables to global design tokens */
:root {
    --primary-color: var(--primary, #7c6cf5);
    --secondary-color: var(--accent, #f87cb3);
    --accent-color: var(--secondary, #5cc8d4);
    --text-color: var(--text-primary, #2d2440);
    --card-bg: var(--card-bg, #ffffff);
    --bg-input: var(--bg-color, #fffbfe);
    --border-color: var(--gray-light, #e2e8f0);
    --box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.12));
    --box-shadow-lg: var(--shadow-xl, 0 20px 40px rgba(0,0,0,0.15));
    --border-radius: var(--border-radius, 12px);
    --border-radius-lg: var(--border-radius-lg, 20px);
    --success-color: #4ade80;
    --error-color: #e53e3e;
    --warning-color: #ed8936;
    --water-light: rgba(124, 108, 245, 0.10);
    --water-medium: rgba(124, 108, 245, 0.18);
    --transition: var(--transition-base, 0.3s ease);
}

/* Ensure content clears floating controls and prevent large footer */
.container {
    padding-top: 120px;
    min-height: calc(100vh - 120px);
    padding-bottom: 2rem;
    position: relative;
    z-index: 1;
}

/* Prevent body from creating extra space */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Atmospheric floating decorations (fixed behind all content) */
.dashboard-atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Header */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

/* Header actions on the left */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-btn.small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 999px; /* pill/round buttons */
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
    font-weight: 600;
}

.nav-btn.small.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.nav-btn.small.secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-btn.small.primary {
    background: var(--gradient-primary);
    color: white;
}

.nav-btn.small.primary:hover {
    transform: translateY(-2px);
}

.nav-btn.small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

[data-theme="dark"] .dashboard-header {
    border-bottom: 1px solid var(--border-color);
}

/* Dark mode fade effect for mobile user-menu */
@media (max-width: 768px) {
    [data-theme="dark"] .user-menu {
        background: none;
    }
}

/* Logo styles for dashboard */
.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo .logo-img {
    max-height: 50px;
    width: auto;
    margin-right: 12px;
    transition: var(--transition);
}

.logo .logo-img.rounded {
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    padding: 2px;
}

.logo .logo-img:hover {
    transform: scale(1.05);
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* User Menu */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    text-align: right;
}

#username {
    font-weight: 600;
    display: block;
}

.anonymous-badge {
    font-size: 0.75rem;
    background: var(--water-light);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    display: inline-block;
    margin-top: 0.25rem;
    font-weight: 700;
}

[data-theme="dark"] .anonymous-badge {
    border-color: rgba(255, 255, 255, 0.12);
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dark mode toggle */
.dark-toggle {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--card-bg);
    box-shadow: var(--box-shadow);
    border-radius: 5px;
    width: 200px;
    z-index: 100;
    margin-top: 0.5rem;
    display: none;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu ul {
    list-style: none;
    padding: 0;
}

.dropdown-menu li {
    border-bottom: 1px solid #eee;
}

[data-theme="dark"] .dropdown-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
}

[data-theme="dark"] .dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Dashboard Content */
/* welcome banner removed */

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.dashboard-card {
    background-color: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 8px 24px -4px rgba(124, 108, 245, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .dashboard-card {
    background: rgba(28, 22, 50, 0.92);
    border: 1px solid rgba(124, 108, 245, 0.18);
    box-shadow:
        0 0 0 1px rgba(124, 108, 245, 0.08),
        0 16px 40px rgba(0, 0, 0, 0.4);
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px -8px rgba(124, 108, 245, 0.18), 0 8px 16px -4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .dashboard-card:hover {
    box-shadow:
        0 0 0 1px rgba(124, 108, 245, 0.22),
        0 24px 56px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(124, 108, 245, 0.08);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(124, 108, 245, 0.07), transparent);
    flex-shrink: 0;
}

[data-theme="dark"] .card-header {
    background: linear-gradient(135deg, rgba(124, 108, 245, 0.12), transparent);
    border-bottom-color: rgba(124, 108, 245, 0.15);
}

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.add-btn {
    font-size: 1.5rem;
    font-weight: bold;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    border-radius: 50%;
    padding: 0;
    transition: all 0.2s ease;
}

.add-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.dashboard-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: none;
    padding-bottom: 0;
}

.dashboard-card .card-header h3 {
    margin-bottom: 0;
}

.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Anonymous Warning */
.anonymous-warning {
    background: linear-gradient(135deg, rgba(237, 137, 54, 0.05), transparent);
    border: 2px solid var(--warning-color);
    position: relative;
    overflow: hidden;
}

.anonymous-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--warning-color), #ffa726);
}

[data-theme="dark"] .anonymous-warning {
    background: linear-gradient(135deg, rgba(251, 211, 141, 0.1), transparent);
    border: 2px solid var(--warning-color);
}

.anonymous-warning .card-header {
    background: linear-gradient(135deg, rgba(237, 137, 54, 0.1), transparent);
    border-bottom-color: rgba(237, 137, 54, 0.2);
}

.anonymous-warning h3 {
    color: var(--warning-color);
    font-weight: 700;
}

[data-theme="dark"] .anonymous-warning h3 {
    color: var(--warning-color);
}

.anonymous-info {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.875rem;
    flex: 1;
}

.anonymous-info p {
    margin-bottom: 0.75rem;
}

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

/* Stats */
.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

[data-theme="dark"] .stat-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: #666;
}

[data-theme="dark"] .stat-label {
    color: #aaa;
}

.stat-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* Activity List */
.activity-item {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-item:hover {
    background-color: rgba(124, 108, 245,0.05);
    padding-left: 0.5rem;
    border-radius: 5px;
}

[data-theme="dark"] .activity-item:hover {
    background-color: rgba(124, 108, 245,0.1);
}

[data-theme="dark"] .activity-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-content {
    flex: 1;
}

.activity-type {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.activity-details {
    font-size: 0.9rem;
    color: #666;
}

.activity-details .activity-completed {
    color: var(--success-color, #10b981);
    font-weight: 600;
    margin-left: 0.25rem;
}

[data-theme="dark"] .activity-details {
    color: #aaa;
}

.activity-date {
    font-weight: 500;
}

.activity-location {
    font-style: italic;
}

.activity-actions {
    display: flex;
    align-items: center;
}

.play-btn {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.delete-btn {
    color: var(--error-color);
    font-size: 1.2rem;
}

.activity-item:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    transform: scale(1.1);
}

.activity-list {
    list-style: none;
    padding: 0;
}

.no-data {
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem 0;
}

[data-theme="dark"] .no-data {
    color: #777;
}

/* Activity Detail Modal */
.activity-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12000; /* above floating controls */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.activity-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.activity-detail-modal {
    background: var(--modal-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--gray-light);
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    transform: scale(0.96) translateY(-50px);
    opacity: 0;
    transition: all var(--transition-spring);
}

.activity-modal-overlay.active .activity-detail-modal {
    transform: translateY(0);
    opacity: 1;
}

/* Lock body scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}

.activity-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

[data-theme="dark"] .activity-detail-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-detail-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Themed Buttons (align with landing/login) */
.btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.25rem;
    height: 48px;
    font-family: var(--font-primary);
    font-weight: 700;
    letter-spacing: 0.2px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.btn:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.btn.primary {
    background: var(--gradient-primary);
    color: #fff;
}

.btn.primary:hover {
    transform: translateY(-2px);
}

.btn.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transition: left 0.6s ease;
}

.btn.primary:hover::before { left: 100%; }

.btn.secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--gray-light, #e2e8f0);
}

.btn.secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary, #7c6cf5);
    color: var(--primary, #7c6cf5);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-color);
}

.activity-detail-content {
    margin-bottom: 1.5rem;
}

.detail-item {
    margin-bottom: 1rem;
}

.detail-label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.3rem;
    color: #666;
}

[data-theme="dark"] .detail-label {
    color: #aaa;
}

.detail-value {
    color: var(--text-color);
}

.detail-notes {
    background-color: rgba(0, 0, 0, 0.03);
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

[data-theme="dark"] .detail-notes {
    background-color: rgba(255, 255, 255, 0.05);
}

.detail-rating {
    display: flex;
    margin-top: 0.5rem;
}

.rating-star {
    color: #ddd;
    font-size: 1.2rem;
    margin-right: 0.2rem;
}

.rating-star.filled {
    color: var(--primary-color);
}

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

/* New Session Modal */
.new-session-modal {
    max-width: 500px;
    padding: 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Scrollbar styling for new session modal */
.new-session-modal::-webkit-scrollbar {
    width: 10px;
}

.new-session-modal::-webkit-scrollbar-track {
    background: transparent;
}

.new-session-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color, #6a11cb), var(--secondary-color, #fc466b));
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.new-session-modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary-color, #fc466b), var(--primary-color, #6a11cb));
    background-clip: padding-box;
}

[data-theme="dark"] .new-session-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7a21db, #fc466b);
    border-color: rgba(0, 0, 0, 0.2);
    background-clip: padding-box;
}

/* Gamemode Step */
.session-step {
    animation: stepFadeIn 0.25s ease;
}

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Title badge (Beta) */
.title-badge {
    display: inline-block;
    vertical-align: middle;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.4rem;
    position: relative;
    top: -1px;
}

.title-badge.experimental {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.gamemode-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.gamemode-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 2px solid transparent;
    border-radius: 16px;
    background:
        linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
        linear-gradient(135deg, rgba(124, 108, 245, 0.25), rgba(248, 124, 179, 0.25)) border-box;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    overflow: hidden;
    width: 100%;
    text-align: left;
}

[data-theme="dark"] .gamemode-card {
    background:
        linear-gradient(rgba(28, 22, 50, 0.95), rgba(28, 22, 50, 0.95)) padding-box,
        linear-gradient(135deg, rgba(124, 108, 245, 0.4), rgba(248, 124, 179, 0.4)) border-box;
}

.gamemode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    transition: left 0.6s ease;
}

.gamemode-card:hover::before {
    left: 100%;
}

.gamemode-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 30px rgba(124, 108, 245, 0.18),
        0 0 0 1px rgba(124, 108, 245, 0.12);
    background:
        linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
        linear-gradient(135deg, var(--primary-color), var(--secondary-color)) border-box;
}

[data-theme="dark"] .gamemode-card:hover {
    box-shadow:
        0 8px 30px rgba(124, 108, 245, 0.22),
        0 0 0 1px rgba(124, 108, 245, 0.18);
    background:
        linear-gradient(rgba(28, 22, 50, 0.95), rgba(28, 22, 50, 0.95)) padding-box,
        linear-gradient(135deg, var(--primary-color), var(--secondary-color)) border-box;
}

.gamemode-card.gamemode-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gamemode-card.gamemode-disabled:hover {
    transform: none;
    box-shadow: none;
    background:
        linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
        linear-gradient(135deg, rgba(124, 108, 245, 0.3), rgba(248, 124, 179, 0.3)) border-box;
}

[data-theme="dark"] .gamemode-card.gamemode-disabled:hover {
    background:
        linear-gradient(rgba(28, 22, 50, 0.95), rgba(28, 22, 50, 0.95)) padding-box,
        linear-gradient(135deg, rgba(124, 108, 245, 0.4), rgba(248, 124, 179, 0.4)) border-box;
}

/* Gamemode card inner layout */
.gamemode-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(124, 108, 245, 0.15), rgba(248, 124, 179, 0.15));
    border: 1px solid rgba(124, 108, 245, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: background 0.25s ease;
}

.gamemode-card:hover .gamemode-icon {
    background: linear-gradient(135deg, rgba(124, 108, 245, 0.25), rgba(248, 124, 179, 0.25));
}

.gamemode-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.gamemode-arrow {
    flex-shrink: 0;
    color: var(--text-color);
    opacity: 0.3;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.gamemode-card:hover .gamemode-arrow {
    opacity: 0.7;
    transform: translateX(3px);
}

.gamemode-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 0.1rem;
}

/* Badge inside title (e.g. "Experimental") */
.title-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.title-badge.experimental {
    background: none;
    border: none;
    border-radius: 0;
    color: #ef4444;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.title-badge.experimental::before {
    content: '';
    display: inline-block;
    width: 1px;
    height: 0.9em;
    background: rgba(239, 68, 68, 0.45);
    border-radius: 1px;
}

.gamemode-desc {
    font-size: 0.82rem;
    color: var(--text-color);
    opacity: 0.55;
    line-height: 1.45;
}

.gamemode-requirements {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.5;
    margin-top: 0.2rem;
}

/* Label "optional" badge */
.label-optional {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.45;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
    margin-left: 0.25rem;
}

/* Inline badge (Coming Soon) */
.gamemode-badge {
    display: inline-block;
    vertical-align: middle;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* Back button in modal header */
.gamemode-back-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    transition: background 0.2s ease;
    line-height: 1;
    margin-right: 0.5rem;
}

.gamemode-back-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .gamemode-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.new-session-form {
    margin-top: 1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] .form-group input {
    border-color: #444;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(124, 108, 245,0.1);
}

/* Responsive Design - Scrollable header buttons */
@media (max-width: 900px) {
    .dashboard-header {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0 !important;
        position: relative;
    }
    
    .header-actions {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        /* No visible scrollbar — it added height below the buttons and pushed
           the row out of line with the bell/avatar. Still swipeable; the
           right-edge fade hints that more buttons are hiding. */
        scrollbar-width: none;
        padding: 0.25rem 0;
        padding-right: 0.5rem;
        mask-image: linear-gradient(to right, black 0%, black calc(100% - 3rem), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 0%, black calc(100% - 3rem), transparent 100%);
    }

    .header-actions::-webkit-scrollbar {
        display: none;
    }
    
    .user-menu {
        flex: 0 0 auto !important;
        position: relative;
        z-index: 2;
        margin-left: 1.5rem;
        padding-left: 1.5rem;
        background: linear-gradient(to right, transparent 0%, var(--bg-color) 35%);
    }
    
    /* Smaller buttons */
    .nav-btn.small {
        padding: 0.45rem 0.85rem;
        font-size: 0.85rem;
        flex-shrink: 0;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .nav-btn.small {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .user-menu {
        margin-left: 1rem;
        padding-left: 1.25rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-card {
        border-radius: 12px;
    }
    
    .card-header {
        padding: 1rem 1rem 0.75rem;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .welcome-banner {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .welcome-banner h2 {
        font-size: 1.5rem;
    }
    
    .welcome-banner p {
        font-size: 1rem;
    }
    
    .activity-detail-modal {
        width: 95%;
        padding: 1.5rem;
    }
    
    .new-session-modal {
        width: 95%;
        max-width: none;
        max-height: 85vh;
    }
    
    .add-friend-modal {
        width: 95%;
        max-width: none;
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .container {
        padding-top: 100px;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        padding-bottom: 60px;
    }
    
    .dashboard-header {
        padding: 0.75rem 0;
        margin-bottom: 1rem;
    }
    
    .user-menu {
        gap: 0.4rem;
        padding-left: 0.75rem;
    }
    
    .user-info {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }
    
    .user-info #username {
        font-size: 0.8rem;
        max-width: 60px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .anonymous-badge {
        display: none; /* Hide badge on small screens */
    }
    
    .nav-btn.small {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .avatar {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
    
    .card-header h3 {
        font-size: 1.1rem;
    }
    
    .friend-item {
        padding: 0.5rem;
        border-radius: 12px;
    }
    
    .friend-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .friend-username {
        font-size: 0.9rem;
    }
    
    .notification-item {
        padding: 0.6rem 0.75rem;
        flex-wrap: wrap;
    }
    
    .notification-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
    
    .activity-detail-modal {
        padding: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .container {
        padding-top: 90px;
    }
    
    .nav-btn.small {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .user-info #username {
        max-width: 55px;
        font-size: 0.8rem;
    }
    
    .avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .user-menu {
        padding-left: 0.75rem;
    }
    
    .dashboard-card {
        border-radius: 10px;
    }
    
    .card-header {
        padding: 0.75rem 0.75rem 0.5rem;
    }
    
    .card-content {
        padding: 0.75rem;
    }
}

/* Notification System */
/* ── Toast Notifications ───────────────────────────── */
.notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1.1rem;
    border-radius: 14px;
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    background: rgba(18, 14, 35, 0.92);
    border: 1px solid rgba(124, 108, 245, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.04) inset;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateY(calc(100% + 32px));
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    z-index: 12001;
    max-width: 360px;
    min-width: 220px;
    pointer-events: none;
}

[data-theme="light"] .notification {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(124, 108, 245, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0,0,0,0.04) inset;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Left accent bar */
.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 3px;
    border-radius: 0 3px 3px 0;
}

/* Icon */
.notif-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.notif-msg {
    flex: 1;
    line-height: 1.4;
}

/* Type variants */
.notification-success::before { background: #22c55e; }
.notification-success .notif-icon { background: rgba(34, 197, 94, 0.12); color: #22c55e; }

.notification-error::before { background: #ef4444; }
.notification-error .notif-icon { background: rgba(239, 68, 68, 0.12); color: #ef4444; }

.notification-info::before { background: var(--primary-color); }
.notification-info .notif-icon { background: rgba(124, 108, 245, 0.12); color: var(--primary-color); }

.notification-warning::before { background: #f59e0b; }
.notification-warning .notif-icon { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

/* Backward-compat aliases */
.notification.success { }
.notification.error   { }

@media (max-width: 640px) {
    .notification {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
        transform: translateY(calc(100% + 24px));
    }
}

/* Disabled notice styling */
.disabled-notice {
    font-size: 0.8rem;
    opacity: 0.7;
    font-style: italic;
}


/* Dashboard Notifications Card */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--water-light);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--water-medium);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.notification-title {
    font-weight: 600;
    color: var(--text-color);
}

.notification-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 600;
}

.notification-btn.primary {
    background: var(--primary-color);
    color: #fff;
}

.notification-btn.secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.notification-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* ===================================
   Bell Notification Button
   =================================== */

.bell-wrapper {
    position: relative;
}

.bell-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.bell-btn:hover {
    background: var(--water-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.bell-btn.has-notifications {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

[data-theme="dark"] .bell-btn {
    border-color: rgba(124, 108, 245, 0.3);
}

[data-theme="dark"] .bell-btn:hover,
[data-theme="dark"] .bell-btn.has-notifications {
    background: rgba(124, 108, 245, 0.12);
    border-color: rgba(124, 108, 245, 0.6);
}

.bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #f87cb3, #fc466b);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-color);
    pointer-events: none;
    animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes badgePop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* Notification Dropdown */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: var(--modal-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.notif-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

[data-theme="dark"] .notif-dropdown {
    background: rgba(28, 22, 50, 0.97);
    border-color: rgba(124, 108, 245, 0.25);
    box-shadow:
        0 0 0 1px rgba(124, 108, 245, 0.12),
        0 20px 50px rgba(0, 0, 0, 0.5);
}

.notif-dropdown-header {
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-color);
    background: linear-gradient(135deg, rgba(124, 108, 245, 0.07), transparent);
}

[data-theme="dark"] .notif-dropdown-header {
    border-bottom-color: rgba(124, 108, 245, 0.15);
}

.notif-dropdown-body {
    max-height: 360px;
    overflow-y: auto;
    padding: 0.5rem;
}

.notif-dropdown-body::-webkit-scrollbar {
    width: 6px;
}

.notif-dropdown-body::-webkit-scrollbar-track {
    background: transparent;
}

.notif-dropdown-body::-webkit-scrollbar-thumb {
    background: rgba(124, 108, 245, 0.3);
    border-radius: 999px;
}

.notif-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Notification items inside dropdown */
.notif-list .notification-item {
    border-radius: 10px;
    padding: 0.75rem;
    border-left: none;
}

/* Mobile: dropdown goes full-width below header */
@media (max-width: 480px) {
    .notif-dropdown {
        width: calc(100vw - 2rem);
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-8px) scale(0.97);
    }

    .notif-dropdown.open {
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* ===================================
   Friends List — Redesigned
   =================================== */

.friends-list {
    display: flex;
    flex-direction: column;
}

.friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.25rem;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    transition: background 0.18s ease, padding-left 0.18s ease;
    position: relative;
}

[data-theme="dark"] .friend-item {
    border-bottom-color: rgba(124, 108, 245, 0.1);
}

.friend-item:last-child {
    border-bottom: none;
}

.friend-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity 0.18s ease, left 0.18s ease;
}

.friend-item:hover {
    background: var(--water-light);
    padding-left: 0.5rem;
    border-radius: 10px;
}

.friend-item:hover::before {
    opacity: 1;
    left: 0;
}

.friend-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

/* Avatar wrapper holds the avatar + status dot */
.friend-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.friend-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    transition: box-shadow 0.2s ease;
}

/* Online glow ring */
.friend-item:has(.friend-status-dot.online) .friend-avatar {
    box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--success-color);
}

/* Status dot — positioned on avatar bottom-right */
.friend-status-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
    background: var(--text-secondary);
}

.friend-status-dot.online {
    background: var(--success-color);
    animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
    50%       { box-shadow: 0 0 0 4px rgba(74, 222, 128, 0); }
}

.friend-info {
    flex: 1;
    min-width: 0;
}

.friend-username {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-status {
    font-size: 0.76rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.friend-status.online {
    color: var(--success-color);
    font-weight: 500;
}

.friend-last-seen {
    color: var(--text-secondary);
    font-size: 0.76rem;
}

/* Action buttons — always visible (hover only emphasizes them) */
.friend-actions {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    opacity: 0.75;
    transition: opacity 0.18s ease;
}

.friend-item:hover .friend-actions {
    opacity: 1;
}

/* Unread-DM count on a friend row */
.friend-dm-badge {
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 999px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    margin-left: 6px;
    flex-shrink: 0;
}

.friend-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    color: var(--text-secondary);
    padding: 0;
}

.friend-btn.view-profile:hover {
    background: rgba(124, 108, 245, 0.12);
    color: var(--primary-color);
    transform: scale(1.1);
}

.friend-btn.message:hover {
    background: rgba(124, 108, 245, 0.12);
    color: var(--primary-color);
    transform: scale(1.1);
}

.friend-btn.remove:hover {
    background: rgba(229, 62, 62, 0.1);
    color: var(--error-color);
    transform: scale(1.1);
}

.friend-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.friend-btn:disabled:hover {
    transform: none;
    background: none;
    color: var(--text-secondary);
}

/* Add Friend Modal */
.add-friend-modal {
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Scrollbar styling for add friend modal */
.add-friend-modal::-webkit-scrollbar {
    width: 10px;
}

.add-friend-modal::-webkit-scrollbar-track {
    background: transparent;
}

.add-friend-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color, #6a11cb), var(--secondary-color, #fc466b));
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.add-friend-modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary-color, #fc466b), var(--primary-color, #6a11cb));
    background-clip: padding-box;
}

[data-theme="dark"] .add-friend-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7a21db, #fc466b);
    border-color: rgba(0, 0, 0, 0.2);
    background-clip: padding-box;
}

.add-friend-form .form-group {
    margin-bottom: 1rem;
}

.add-friend-form label {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.add-friend-form input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-input);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.add-friend-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(124, 108, 245,0.1);
}

/* User Search Results */
.search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--card-bg);
    margin-top: 0.5rem;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--water-light);
}

.search-result-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-username {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.search-result-join-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.no-search-results {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* Selected User */
.selected-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--water-light);
    border-radius: 999px;
    border: 2px solid var(--primary-color);
    margin-top: 0.5rem;
    overflow: hidden;
}

.selected-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.selected-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.selected-details {
    flex: 1;
}

.selected-username {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.selected-join-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 1.2rem;
    color: var(--error-color);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-clear:hover {
    background: rgba(255, 0, 0, 0.1);
    transform: scale(1.1);
}

/* Friend Requests Section */
.friend-requests-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .friend-requests-section {
    border-bottom-color: rgba(124, 108, 245, 0.12);
}

.friends-section {
    margin-top: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.section-header h4 {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.requests-count,
.friends-count {
    background: rgba(124, 108, 245, 0.12);
    color: var(--primary-color);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
    border: 1px solid rgba(124, 108, 245, 0.2);
}

.friend-requests-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.friend-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--water-light);
    border-radius: 999px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
    overflow: hidden;
}

.friend-request-item:hover {
    background: var(--water-medium);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.friend-request-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.friend-request-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.friend-request-info {
    flex: 1;
    min-width: 0;
}

.friend-request-username {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.friend-request-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.friend-request-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.friend-request-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 0.8rem;
    font-weight: 500;
}

.friend-request-btn.accept {
    background: var(--success-color);
    color: white;
}

.friend-request-btn.accept:hover {
    background: #38a169;
    transform: scale(1.05);
}

.friend-request-btn.decline {
    background: var(--error-color);
    color: white;
}

.friend-request-btn.decline:hover {
    background: #c53030;
    transform: scale(1.05);
}

.friend-request-btn.cancel {
    background: var(--text-secondary);
    color: white;
}

.friend-request-btn.cancel:hover {
    background: #666;
    transform: scale(1.05);
}

.friend-request-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.friend-request-btn:disabled:hover {
    transform: none;
}

.no-requests-message {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 1rem;
    background: var(--water-light);
    border-radius: 999px;
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

/* Difficulty Buttons */
.difficulty-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.difficulty-btn {
    flex: 1;
    background: var(--card-bg);
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .difficulty-btn {
    background: rgba(28, 22, 50, 0.8);
    border: 2px solid rgba(124, 108, 245, 0.2);
}

.difficulty-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.difficulty-btn:hover::before {
    left: 100%;
}

.difficulty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

[data-theme="dark"] .difficulty-btn:hover {
}

.difficulty-btn.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(124, 108, 245, 0.06), rgba(124, 108, 245, 0.12));
    transform: translateY(-2px);
}

[data-theme="dark"] .difficulty-btn.active {
    background: linear-gradient(135deg, rgba(124, 108, 245, 0.15), rgba(124, 108, 245, 0.25));
}

.difficulty-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.difficulty-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.difficulty-btn.active .difficulty-name {
    color: var(--primary-color);
}

.difficulty-desc {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.2;
}

[data-theme="dark"] .difficulty-desc {
    color: #aaa;
}

.difficulty-btn.active .difficulty-desc {
    color: var(--primary-color);
    opacity: 0.8;
}

/* Difficulty Preview */
.difficulty-preview {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--card-bg);
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    transition: all 0.3s ease;
}

[data-theme="dark"] .difficulty-preview {
    background: rgba(28, 22, 50, 0.8);
    border: 2px solid rgba(124, 108, 245, 0.2);
}

.difficulty-preview h4 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.preview-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.preview-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

[data-theme="dark"] .preview-stat {
    border-bottom-color: rgba(255,255,255,0.05);
}

.preview-stat:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-label {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.85rem;
    opacity: 0.7;
}

.stat-value {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
}

.preview-description {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 0.75rem;
    background: rgba(124, 108, 245,0.05);
    border-radius: 8px;
    border: 1px solid rgba(124, 108, 245,0.1);
}

[data-theme="dark"] .preview-description {
    background: rgba(124, 108, 245,0.1);
    border: 1px solid rgba(124, 108, 245,0.2);
}

/* ===================================
   Privacy / Feed Visibility Options
   =================================== */
.privacy-option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.privacy-option,
label.privacy-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    border: 2px solid transparent;
    background: var(--card-bg);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    position: relative;
}

[data-theme="dark"] .privacy-option {
    background: rgba(28, 22, 50, 0.6);
    border-color: rgba(124, 108, 245, 0.12);
}

.privacy-option:hover {
    border-color: rgba(124, 108, 245, 0.35);
    background: rgba(124, 108, 245, 0.04);
}

[data-theme="dark"] .privacy-option:hover {
    background: rgba(124, 108, 245, 0.08);
    border-color: rgba(124, 108, 245, 0.3);
}

/* Hide default radio input */
.privacy-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Selected state via JS-toggled class or :has */
.privacy-option:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: rgba(124, 108, 245, 0.06);
}

[data-theme="dark"] .privacy-option:has(input[type="radio"]:checked) {
    background: rgba(124, 108, 245, 0.14);
    border-color: rgba(124, 108, 245, 0.55);
}

.privacy-option-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 108, 245, 0.1);
    color: var(--primary-color);
    transition: background 0.2s ease;
}

.privacy-option:has(input[type="radio"]:checked) .privacy-option-icon {
    background: rgba(124, 108, 245, 0.2);
}

.privacy-option-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
}

.privacy-option-text strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.privacy-option-text small {
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.5;
}

/* Responsive difficulty buttons */
@media (max-width: 480px) {
    .difficulty-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .difficulty-btn {
        flex-direction: row;
        align-items: center;
        padding: 0.65rem 0.9rem;
        text-align: left;
        gap: 0.6rem;
    }

    .difficulty-dot {
        margin-bottom: 0;
    }

    .difficulty-name {
        margin-bottom: 0.1rem;
    }

    .difficulty-preview {
        padding: 1rem;
    }

    .preview-stats {
        gap: 0.35rem;
    }

    .preview-stat {
        padding: 0.35rem 0;
    }

    .gamemode-card {
        padding: 0.85rem 1rem;
    }

    .gamemode-icon {
        width: 38px;
        height: 38px;
    }
}

/* ===================================
   Gamemode Tags
   =================================== */
.gamemode-tag {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 6px;
}
.holding-tag {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}
.potty-training-tag {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}
[data-theme="dark"] .holding-tag {
    background: rgba(59, 130, 246, 0.25);
    color: #60a5fa;
}
[data-theme="dark"] .potty-training-tag {
    background: rgba(168, 85, 247, 0.25);
    color: #c084fc;
}

/* ===================================
   Mobile Navbar Fixes
   =================================== */

/* Ensure floating navbar elements always stay visible on mobile */
@media (max-width: 768px) {
    .floating-brand,
    .floating-controls {
        position: fixed !important;
        z-index: 9999 !important;
        transform: none !important;
        -webkit-transform: none !important;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    
    .floating-brand {
        top: 14px !important;
        left: 14px !important;
    }
    
    .floating-controls {
        top: 14px !important;
        right: 14px !important;
        left: auto !important;
    }
} 
/* Visibility selector in the session detail modal */
.detail-privacy-select {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--gray-light);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
}

.detail-privacy-select:hover,
.detail-privacy-select:focus {
    border-color: rgba(124, 108, 245, 0.45);
}
