* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Reserve scrollbar space to prevent layout shift when switching tabs (e.g. My Apps vs Calendar) */
html {
    scrollbar-gutter: stable;
}

:root {
    --base-font-size: 1rem;
    --font-size-large: 1.15rem;
    
    /* Steam-inspired color palette */
    --steam-bg-primary: #1b2838;
    --steam-bg-secondary: #16202d;
    --steam-bg-tertiary: #0e1621;
    --steam-nav-bg: #171a21;
    --steam-nav-secondary: #1e2329;
    --steam-accent-blue: #66c0f4;
    --steam-accent-blue-dark: #416e91;
    --steam-text-primary: #c7d5e0;
    --steam-text-secondary: #8f98a0;
    --steam-text-muted: #6d7882;
    --steam-green: #5c7e10;
    --steam-green-bright: #a4d007;
    --steam-red: #d32d2d;
    --steam-red-bright: #ff4444;
    --steam-border: #2a475e;
    --steam-card-bg: #1e2329;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--steam-bg-primary);
    min-height: 100vh;
    color: var(--steam-text-primary);
    font-size: var(--base-font-size);
    transition: background 0.3s ease, color 0.3s ease;
}

/* Steam theme is now default - dark mode variations */
[data-theme="dark"] {
    /* Keep Steam colors as default */
}

[data-theme="dark"] body {
    background: var(--steam-bg-primary);
    color: var(--steam-text-primary);
}

[data-theme="dark"] .navbar {
    background: var(--steam-nav-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .nav-search-box input {
    background: var(--steam-nav-secondary);
    color: var(--steam-text-primary);
    border-color: var(--steam-border);
}

[data-theme="dark"] .nav-search-box input:focus {
    background: var(--steam-bg-secondary);
    border-color: var(--steam-accent-blue);
}

[data-theme="dark"] .nav-btn {
    color: var(--steam-text-primary);
}

[data-theme="dark"] .nav-btn:hover {
    background: var(--steam-bg-secondary);
    color: var(--steam-text-primary);
}

[data-theme="dark"] .nav-btn.active {
    background: var(--steam-accent-blue-dark);
    color: white;
}

[data-theme="dark"] .login-btn {
    color: var(--steam-text-primary);
}

[data-theme="dark"] .app-count-badge {
    background: var(--steam-accent-blue-dark);
    color: white;
}

[data-theme="dark"] .app-card {
    background: var(--steam-card-bg);
    color: var(--steam-text-primary);
    border-color: var(--steam-border);
}

[data-theme="dark"] .app-description {
    color: var(--steam-text-secondary);
}

[data-theme="dark"] .app-name {
    color: var(--steam-text-primary);
}

[data-theme="dark"] .card-action-btn {
    color: white;
}

[data-theme="dark"] .app-status-text {
    color: white;
}

[data-theme="dark"] .footer-content {
    color: var(--steam-text-secondary);
}

[data-theme="dark"] .footer-content a {
    color: var(--steam-accent-blue);
}

/* Dark mode for Profile Page */
[data-theme="dark"] .profile-header {
    background: var(--steam-card-bg);
    color: var(--steam-text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .profile-header h2 {
    color: var(--steam-text-primary);
}

[data-theme="dark"] .app-count {
    color: var(--steam-text-secondary);
}

[data-theme="dark"] .app-count span {
    color: var(--steam-accent-blue);
}

[data-theme="dark"] .profile-pagination-inner {
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
}

[data-theme="dark"] .pagination-info {
    color: var(--steam-text-secondary);
}

[data-theme="dark"] .pagination-btn {
    background: transparent;
    color: var(--steam-text-primary);
}

[data-theme="dark"] .pagination-btn:hover:not(:disabled) {
    background: var(--steam-accent-blue-dark);
    color: #ffffff;
}

[data-theme="dark"] .pagination-btn:disabled {
    opacity: 0.4;
    color: var(--steam-text-muted);
}

[data-theme="dark"] .profile-apps {
    background: var(--steam-bg-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .profile-app-card-content {
    background: var(--steam-card-bg);
    border-color: var(--steam-border);
}

[data-theme="dark"] .profile-app-card:hover .profile-app-card-content {
    background: var(--steam-bg-secondary);
    border-color: var(--steam-accent-blue-dark);
}

[data-theme="dark"] .profile-app-more-info {
    background: var(--steam-accent-blue-dark);
    border-color: var(--steam-border);
}

[data-theme="dark"] .profile-app-more-info:hover {
    background: var(--steam-accent-blue);
    border-color: var(--steam-accent-blue);
}

[data-theme="dark"] .empty-profile {
    background: var(--steam-card-bg);
    color: var(--steam-text-secondary);
}

[data-theme="dark"] .empty-profile-cta {
    background: var(--steam-accent-blue-dark);
}

[data-theme="dark"] .edit-profile-btn {
    background: var(--steam-accent-blue-dark);
}

[data-theme="dark"] .edit-profile-btn.active {
    background: var(--steam-green);
}

[data-theme="dark"] .remove-app-x {
    border-color: var(--steam-border);
}

[data-theme="dark"] .remove-app-x:hover {
    border-color: var(--steam-red-bright);
}

/* Dark mode for page container and search filter */
[data-theme="dark"] .page {
    background: transparent !important;
    color: #e0e0e0;
}

[data-theme="dark"] #profile-page {
    background: transparent;
}

/* Dark mode for App Detail Page */
[data-theme="dark"] .app-detail-page {
    background: #1a1a1a;
    color: #e0e0e0;
}

[data-theme="dark"] .app-detail-title {
    color: #e0e0e0;
}

[data-theme="dark"] .app-detail-section h3 {
    color: #e0e0e0;
    border-bottom-color: #667eea;
}

[data-theme="dark"] .app-detail-description {
    color: #d0d0d0;
}

[data-theme="dark"] .app-detail-description p {
    color: #d0d0d0;
}

[data-theme="dark"] .app-detail-full-info {
    color: #d0d0d0;
}

[data-theme="dark"] .app-detail-full-info p {
    color: #d0d0d0;
}

[data-theme="dark"] .app-detail-event {
    background: #2a2a2a !important;
}

[data-theme="dark"] .app-detail-event-current {
    border-left-color: #2ed573;
}

[data-theme="dark"] .app-detail-event-upcoming {
    border-left-color: #ffa502;
}

[data-theme="dark"] .app-detail-event h5 {
    color: #e0e0e0;
}

[data-theme="dark"] .app-detail-event-description {
    color: #ccc;
}

[data-theme="dark"] .app-detail-event-description p {
    color: #ccc;
}

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

[data-theme="dark"] .app-detail-event-meta a {
    color: #8fa3ff;
}

[data-theme="dark"] .app-detail-error {
    color: #ccc;
}

[data-theme="dark"] .app-detail-error h2 {
    color: #ff6b7a;
}

[data-theme="dark"] .app-detail-screenshot-scroll {
    background: #2a2a2a;
    scrollbar-color: #667eea #444;
}

[data-theme="dark"] .app-detail-screenshots-scroll::-webkit-scrollbar-track {
    background: #444;
}

[data-theme="dark"] .app-detail-screenshot-scroll {
    background: #2a2a2a;
}

[data-theme="dark"] .app-detail-ecosystem-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-left-color: #667eea;
}

[data-theme="dark"] .app-detail-ecosystem-box p {
    color: #ccc;
}

[data-theme="dark"] .app-detail-ecosystem-logo {
    background: #2a2a2a;
}

[data-theme="dark"] .app-detail-ecosystem-name {
    color: #8fa3ff;
}

[data-theme="dark"] .app-detail-ecosystem-name:hover {
    color: #a4b5ff;
}

[data-theme="dark"] .app-detail-close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

[data-theme="dark"] .app-detail-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .app-tags .tag:not(.tag-game-genre):not(.tag-blockchain):not(.tag-platform):not(.tag-gameplay):not(.tag-web3):not(.tag-company):not(.tag-vc):not(.tag-theme):not(.tag-other),
[data-theme="dark"] .app-card-tags .tag:not(.tag-game-genre):not(.tag-blockchain):not(.tag-platform):not(.tag-gameplay):not(.tag-web3):not(.tag-company):not(.tag-vc):not(.tag-theme):not(.tag-other) {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
}

[data-theme="dark"] .app-tags .tag:not(.tag-game-genre):not(.tag-blockchain):not(.tag-platform):not(.tag-gameplay):not(.tag-web3):not(.tag-company):not(.tag-vc):not(.tag-theme):not(.tag-other):hover,
[data-theme="dark"] .app-card-tags .tag:not(.tag-game-genre):not(.tag-blockchain):not(.tag-platform):not(.tag-gameplay):not(.tag-web3):not(.tag-company):not(.tag-vc):not(.tag-theme):not(.tag-other):hover {
    background: #333;
    border-color: #667eea;
}

/* Ensure category-specific tag colors work in dark theme for app-card-tags */
[data-theme="dark"] .app-card-tags .tag-game-genre {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
    border: none;
}

[data-theme="dark"] .app-card-tags .tag-blockchain {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border: none;
}

[data-theme="dark"] .app-card-tags .tag-platform {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
}

[data-theme="dark"] .social-link {
    background: #2a2a2a;
}

[data-theme="dark"] .social-link:hover {
    background: #333;
}

[data-theme="dark"] .key-voice-avatar {
    border: 2px solid #444;
}

[data-theme="dark"] .key-voice-avatar:hover {
    border-color: #667eea;
}

[data-theme="dark"] .key-voices-label {
    color: #ccc;
}

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

[data-theme="dark"] .search-filter-container {
    background: #2a2a2a;
    color: #e0e0e0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .no-more-apps-content {
    background: #2a2a2a;
    color: #ccc;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Font Size Options */
[data-font-size="small"] {
    --base-font-size: 0.85rem;
}

[data-font-size="small"] body {
    font-size: var(--base-font-size);
}

[data-font-size="bigger"] {
    --base-font-size: 1.15rem;
}

[data-font-size="bigger"] body {
    font-size: var(--base-font-size);
}

[data-font-size="huge"] {
    --base-font-size: 1.32rem;
}

[data-font-size="huge"] body {
    font-size: var(--base-font-size);
}

/* Navigation - Steam Compact Style */
.navbar {
    --nav-height: 56px;
    background: var(--steam-nav-bg);
    padding: 0.5rem 1rem;
    min-height: var(--nav-height);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--steam-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Desktop layout: logo left, search center, My Apps right */
.nav-search-and-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.nav-search-box {
    flex: 1;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    max-width: 60%;
    margin: 0 auto;
}

/* Hide search bar when profile page is active (handled by JS, but CSS fallback) */
.nav-search-box.hidden {
    display: none !important;
}

.nav-buttons {
    margin-left: auto;
}

/* Prevent icon buttons from shrinking on narrow layouts (Community, Calendar always visible) */
.nav-btn-icon {
    flex-shrink: 0;
}

/* When search is hidden (community, my-apps, account), ensure nav-buttons fill space and icons stay visible */
.nav-search-box.hidden + .nav-buttons {
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0.75rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .logo {
        font-size: 1rem;
        text-align: center;
        width: 100%;
        margin-bottom: 0.25rem;
        justify-content: center;
    }
    
    .logo-image {
        height: 1.8rem;
    }
    
    .nav-search-box {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .search-bar-row {
        gap: 0.35rem;
    }

    .search-bar-filters-row {
        gap: 0.3rem;
    }

    .search-tag-chip {
        padding: 0.12rem 0.24rem;
        font-size: 0.62rem;
    }

    .search-tag-chip-label {
        max-width: 70px;
    }

    .search-tag-remove {
        width: 12px;
        height: 12px;
        font-size: 0.7rem;
    }

    .search-bar-hint {
        font-size: 0.58rem;
    }
    
    .nav-buttons {
        width: 100%;
        justify-content: center;
    }
}

.nav-search-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.nav-search-box-with-autocomplete {
    position: relative;
}

.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.2rem;
    background: var(--steam-bg-secondary, #1b2838);
    border: 1px solid var(--steam-border, #2a475e);
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-autocomplete.visible {
    display: block;
}

.search-autocomplete-item {
    display: block;
    width: 100%;
    padding: 0.4rem 0.75rem;
    text-align: left;
    background: none;
    border: none;
    color: var(--steam-text-primary, #c7d5e0);
    font-size: 0.875rem;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
}

.search-autocomplete-item:hover {
    background: var(--steam-accent-blue-dark, #416e91);
}

.search-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    min-width: 0;
}

.search-bar-filters-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    min-height: 0;
}

.search-tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    min-width: 0;
}

.search-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.15rem 0.28rem;
    background: var(--steam-accent-blue-dark);
    color: white;
    border-radius: 2px;
    font-size: 0.68rem;
    font-weight: 500;
    white-space: nowrap;
}

.search-tag-chip-label {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-tag-remove {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    line-height: 1;
    padding: 0;
    transition: background 0.2s;
}

.search-tag-remove:hover {
    background: rgba(255, 255, 255, 0.5);
}

.search-bar-hint {
    font-size: 0.62rem;
    color: var(--steam-text-muted, #8f98a0);
    line-height: 1.2;
    flex-shrink: 0;
}

.search-bar-row input {
    flex: 1;
    min-width: 80px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--steam-border);
    border-radius: 3px;
    font-size: 0.875rem;
    font-family: 'Roboto', sans-serif;
    background: var(--steam-nav-secondary);
    color: var(--steam-text-primary);
    transition: border-color 0.2s, background 0.2s;
}

.nav-search-box input::placeholder {
    color: var(--steam-text-muted);
}

.nav-search-box input:focus {
    outline: none;
    border-color: var(--steam-accent-blue);
    background: var(--steam-bg-secondary);
}

.nav-search-box button {
    padding: 0.5rem 1rem;
    background: var(--steam-accent-blue-dark);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    transition: background 0.2s;
    transition: transform 0.2s;
    white-space: nowrap;
}

.nav-search-box button:hover {
    background: var(--steam-accent-blue);
}

/* Minimal search bar: rounded bar, white input, black icon button */
.nav-search-minimal .search-bar-row {
    display: flex;
    align-items: stretch;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.nav-search-minimal .search-bar-row input {
    flex: 1;
    border: none;
    border-radius: 0;
    background: #fff;
    color: #1a1a1a;
    padding: 0.5rem 0.75rem;
    min-width: 0;
}
.nav-search-minimal .search-bar-row input::placeholder {
    color: #666;
}
.nav-search-minimal .search-btn-icon {
    padding: 0.5rem 0.75rem;
    background: #1a1a1a;
    border: none;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.nav-search-minimal .search-btn-icon:hover {
    background: #333;
}
.nav-search-minimal .search-icon-svg {
    flex-shrink: 0;
}
[data-theme="dark"] .nav-search-minimal .search-bar-row {
    border-color: var(--steam-border);
}
[data-theme="dark"] .nav-search-minimal .search-bar-row input {
    background: var(--steam-bg-secondary);
    color: var(--steam-text-primary);
}
[data-theme="dark"] .nav-search-minimal .search-bar-row input::placeholder {
    color: var(--steam-text-muted);
}
[data-theme="dark"] .nav-search-minimal .search-btn-icon {
    background: var(--steam-bg-tertiary);
    color: var(--steam-text-primary);
}
[data-theme="dark"] .nav-search-minimal .search-btn-icon:hover {
    background: var(--steam-accent-blue-dark);
    color: white;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    color: var(--steam-text-primary);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.logo-link {
    color: var(--steam-text-primary);
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.logo-link:hover {
    color: var(--steam-accent-blue);
    text-decoration: none;
}

.logo-image-wrap {
    position: relative;
    display: inline-block;
}

.logo-image {
    height: 2.25rem;
    width: auto;
    display: block;
    object-fit: contain;
}

.logo-alpha-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #1a1a1a;
    background: #ffeb3b;
    padding: 1px 4px;
    border-radius: 2px;
    line-height: 1.2;
    white-space: nowrap;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.5px;
}

.logo-tagline {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--steam-text-muted);
    font-style: italic;
    margin-left: 0.25rem;
}

.nav-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.nav-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Toggle Switch Styles */
.nav-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    cursor: pointer;
}

.switch-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-input:checked + .switch-slider {
    background-color: #667eea;
}

.switch-input:checked + .switch-slider:before {
    transform: translateX(22px);
}

.switch-label,
.switch-icon {
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    transition: color 0.3s;
}

.switch-input:checked + .switch-slider .switch-label,
.switch-input:checked + .switch-slider .switch-icon {
    color: white;
}

.switch-slider:hover {
    background-color: #bbb;
}

.switch-input:checked + .switch-slider:hover {
    background-color: #5568d3;
}

.nav-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.875rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    color: var(--steam-text-primary);
}

.app-count-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background: var(--steam-accent-blue-dark);
    color: white;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    min-width: 40px;
    text-align: center;
}

.login-btn {
    font-size: 0.875rem;
    font-family: 'Roboto', sans-serif;
    padding: 0.4rem 0.8rem;
}

.nav-btn:hover {
    background: var(--steam-bg-secondary);
    color: var(--steam-text-primary);
}

.nav-btn.active {
    background: var(--steam-accent-blue-dark);
    color: white;
}

/* Community icon - light/white on dark nav */
.nav-community-icon {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* My Apps nav icon + counter overlay on bottom */
.nav-btn-myapps {
    padding: 0.25rem 0.5rem;
    min-width: auto;
}
.nav-myapps-icon-wrapper {
    position: relative;
    display: block;
}
.nav-myapps-icon {
    height: calc(var(--nav-height, 56px) * 0.9);
    width: calc(var(--nav-height, 56px) * 0.9);
    display: block;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.app-count-badge-overlay {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
    min-width: 36px;
    background: var(--steam-accent-blue-dark);
    color: white;
    border-radius: 3px;
    font-weight: 600;
    white-space: nowrap;
}
.app-count-badge-below {
    font-size: 0.6rem;
    padding: 0.08rem 0.25rem;
    min-width: 32px;
}

/* My Apps nav: red event notification badge (top-right, cumulative events from My Apps) */
.nav-myapps-event-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--steam-red);
    color: white;
    border-radius: 2px;
    font-size: 0.7rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    z-index: 5;
    border: 2px solid var(--steam-card-bg);
}
.nav-myapps-event-badge.visible {
    display: inline-flex;
}

/* Account nav: notification badge (circular, top-right) */
.nav-account-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
}

/* Account nav icon - 90% of nav height */
.nav-btn-account {
    padding: 0.2rem;
    min-width: auto;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.nav-account-icon {
    height: calc(var(--nav-height, 56px) * 0.9);
    width: calc(var(--nav-height, 56px) * 0.9);
    display: block;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.nav-account-icon.nav-account-avatar {
    filter: none;
    object-fit: cover;
    border-radius: 6px;
}
.nav-account-label {
    font-size: 0.6rem;
    line-height: 1;
}

/* GM button wrapper */
.gm-button-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    position: relative;
}

.gm-btn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gm-btn {
    padding: 0.25rem 0.5rem;
    min-width: auto;
}

.gm-btn-icon {
    height: 2.8rem;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.gm-active-text {
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    color: var(--steam-text-primary);
}

.gm-btn:disabled,
.gm-btn.gm-cooldown {
    cursor: not-allowed;
    opacity: 0.8;
}

.gm-countdown-text {
    font-size: 0.65rem;
    line-height: 1;
    min-width: 36px;
}

.gm-tooltip-wrapper {
    display: inline-flex;
    position: relative;
}

.gm-tooltip-trigger {
    cursor: help;
    font-size: 0.85rem;
    color: var(--steam-text-secondary);
    line-height: 1;
}

.gm-tooltip-popover {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 6px;
    background: var(--steam-bg-tertiary);
    color: var(--steam-text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    max-width: 220px;
    white-space: normal;
    z-index: 200;
    border: 1px solid var(--steam-border);
}

/* App Settings tooltips (font-size, cancelled-apps) */
.app-tooltip-wrapper {
    display: inline-flex;
    position: relative;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.app-tooltip-trigger {
    cursor: help;
    font-size: 0.85rem;
    color: var(--steam-text-secondary);
    line-height: 1;
}

.app-tooltip-popover {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 6px;
    background: var(--steam-bg-tertiary);
    color: var(--steam-text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    max-width: 260px;
    white-space: normal;
    z-index: 200;
    border: 1px solid var(--steam-border);
}

/* Page Container */
.page {
    display: none;
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.page.active {
    display: block;
}

/* Search and Filter */
.search-filter-container {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-box input {
    width: 50%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.search-box button {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.2s;
}

.search-box button:hover {
    transform: scale(1.05);
}

.filter-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-box label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    white-space: nowrap;
}


.error-message {
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem;
    border-radius: 15px;
    font-size: 1.1rem;
}


/* Swipe Container */
.swipe-container {
    position: relative;
    min-height: auto;
}

/* Swipe Indicators */
.swipe-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.2s;
}

.reject-indicator {
    left: 50px;
}

.approve-indicator {
    right: 50px;
}

.indicator-icon {
    font-size: 5rem;
    font-weight: bold;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: pulse 0.5s ease-in-out infinite;
}

.reject-indicator .indicator-icon {
    color: #ff4757;
}

.approve-indicator .indicator-icon {
    color: #2ed573;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Celebration Overlay */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

.celebration-emoji {
    position: absolute;
    color: #2ed573;
    font-weight: bold;
    animation: celebrationPop 2s ease-out forwards;
    text-shadow: 0 2px 10px rgba(46, 213, 115, 0.5);
}

@keyframes celebrationPop {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg) translate(0, 0);
    }
    15% {
        opacity: 1;
        transform: scale(1.8) rotate(90deg) translate(0, -20px);
    }
    30% {
        transform: scale(1.2) rotate(180deg) translate(0, -40px);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(var(--rotation, 360deg)) translate(0, -150px);
    }
}

@keyframes gmEmojiPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    100% {
        opacity: 1;
        transform: translate(calc(-50% + var(--gm-dx, 0px)), calc(-50% + var(--gm-dy, 0px))) scale(1.2);
    }
}

.card-stack-wrapper {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    min-height: 800px;
    padding-bottom: 200px; /* Space for footer - will be adjusted dynamically */
}

.card-stack {
    position: relative;
    width: 100%;
    margin: 0 auto;
    min-height: 800px;
    overflow: visible; /* allow full card height to show */
}

.card-stack:has(.no-more-apps-content) {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Desktop: show only the top card */
.card-stack .app-card:not(:first-child) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: scale(0.95) translateY(0) !important;
}

@media (max-width: 768px) {
    .card-stack-wrapper {
        max-width: 100%;
        min-height: calc(100vh - 180px);
        padding-bottom: 200px;
    }
    
    .card-stack {
        max-width: 100%;
        min-height: calc(100vh - 180px);
        padding: 0;
    }
}

.app-card {
    position: absolute;
    width: 100%;
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    padding: 0;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    user-select: none;
    overflow: hidden;
    min-height: fit-content;
    top: 0;
    left: 0;
}

.app-card > * {
    flex-shrink: 0;
}

.app-card .app-description-wrapper {
    flex-shrink: 0;
}

/* YouTube Video */
.youtube-video-container {
    width: calc(100% - 3rem);
    margin: 0 1.5rem 1rem;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
    height: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #000;
}

.youtube-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.app-card.hidden {
    display: none;
}

/* Card Action Buttons */
.card-action-buttons-top {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.card-action-buttons-bottom {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    margin-top: auto;
}

.card-action-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.reject-card-btn {
    background: var(--steam-red);
    color: white;
}

.reject-card-btn:hover {
    background: var(--steam-red-bright);
}

.approve-card-btn {
    background: var(--steam-green);
    color: white;
}

.approve-card-btn:hover {
    background: var(--steam-green-bright);
}

.card-action-btn:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.card-action-btn:active {
    transform: scale(0.98);
}

.arrow-left,
.arrow-right {
    font-size: 1.2rem;
    font-weight: bold;
}

/* App Card Buttons */
.app-card-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0 1.5rem 1.5rem;
}

.card-profile-btn,
.card-profile-btn-inline,
.card-website-btn {
    display: block;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 2px;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.card-profile-btn {
    background: var(--steam-accent-blue-dark);
    color: white;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
}

.card-profile-btn:hover {
    background: var(--steam-accent-blue);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.card-profile-btn-inline {
    background: var(--steam-accent-blue-dark);
    color: white;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

.card-profile-btn-inline:hover {
    background: var(--steam-accent-blue);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.card-event-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 71, 87, 0.15);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.card-event-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff4757;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.25);
}

.card-website-btn {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.card-website-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    background: #f0f0ff;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 1.5rem 0.5rem;
    flex-shrink: 0;
}

.app-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.app-name {
    font-size: 1.5rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    color: var(--steam-text-primary);
    flex: 1;
    text-align: left;
}

/* App Status */
.app-status-bar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 1.5rem 1rem;
}

.app-status-bar {
    flex: 0 0 auto;
    padding: 0.4rem 0.8rem;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: fit-content;
}

.app-status-text {
    font-size: 0.75rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-green {
    background: var(--steam-green);
}

.status-yellow {
    background: #8b6914;
}

.status-orange {
    background: #a66321;
}

.status-red {
    background: var(--steam-red);
}

.app-description-wrapper {
    margin: 0 1.5rem 1.5rem;
    flex: 0 0 auto;
}

.app-description {
    font-size: 0.9rem;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--steam-text-secondary);
    margin: 0;
    overflow: visible;
    word-wrap: break-word;
}

/* Screenshots */
.screenshots-container {
    margin: 0 1.5rem 1rem;
    position: relative;
}

.screenshot-display {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #f7f7f7;
    position: relative;
}

.screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
}

.screenshot-nav-btn-overlay {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
    opacity: 0.8;
}

.screenshot-nav-btn-overlay:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.screenshot-nav-btn-overlay:active {
    transform: translateY(-50%) scale(0.95);
}

.prev-btn-overlay {
    left: 10px;
}

.next-btn-overlay {
    right: 10px;
}

.screenshot-counter-overlay {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 10;
}

.product-link {
    display: block;
    text-align: center;
    padding: 0.6rem 0.8rem;
    margin: 0 1.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.product-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 0 1.5rem 1rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    transition: transform 0.2s, background 0.2s;
    text-decoration: none;
}

.social-link:hover {
    transform: scale(1.1);
    background: #e0e0e0;
}

.social-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Key Voices */
.key-voices {
    margin: 0 1.5rem 1rem;
}

.key-voices-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
    text-align: center;
}

.key-voices-avatars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.key-voice-avatar {
    position: relative;
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.key-voice-avatar:hover {
    transform: scale(1.1);
}

.voice-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 1.5rem 1rem;
}

.app-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1rem 1.5rem 1.3rem 1.5rem;
    padding: 0;
}

.app-tags-categorized {
    margin: 0 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tag-category-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tag-category-label {
    font-size: 0.7rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    color: var(--steam-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

.tag-category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    background: var(--steam-accent-blue-dark);
    color: white;
    padding: 0.35rem 0.7rem;
    border-radius: 2px;
    font-size: 0.8rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    user-select: none;
}

/* Category-specific tag colors - Steam palette inspired but unique */
.tag-gameplay {
    background: #4c6b22;
    color: #b8e986;
}

.tag-web3 {
    background: #5c4a72;
    color: #d4afeb;
}

.tag-blockchain {
    background: #416e91;
    color: #a4d4f4;
}

.tag-platform {
    background: #2a475e;
    color: #66c0f4;
}

.tag-company {
    background: #6d4c3d;
    color: #d4a574;
}

.tag-vc {
    background: #3d5a6c;
    color: #8bb8d4;
}

.tag-theme {
    background: #5a4a3d;
    color: #d4c4a5;
}

.tag-game-genre {
    background: #4a5a3d;
    color: #a4d4a5;
}

.tag-other {
    background: #4a4a4a;
    color: #b8b8b8;
}

/* Ensure category-specific colors work in app-card-tags (override dark theme) */
.app-card-tags .tag-game-genre {
    background: #4a5a3d;
    color: #a4d4a5;
}

.app-card-tags .tag-blockchain {
    background: #416e91;
    color: #a4d4f4;
}

.app-card-tags .tag-platform {
    background: #2a475e;
    color: #66c0f4;
}

/* Make tags on app cards clickable */
.app-card-tags .tag {
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.app-card-tags .tag:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.app-card-tags .tag:active {
    transform: translateY(0);
    opacity: 0.8;
}

.tag:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}


/* No more apps - shown inside card-stack at card position */
.no-more-apps-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    min-height: 400px;
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    color: var(--steam-text-secondary);
    font-family: 'Roboto', sans-serif;
}

.no-more-apps-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--steam-text-primary);
    margin: 0 0 1.25rem 0;
}

.no-more-apps-tips {
    text-align: left;
    margin: 0;
    padding-left: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Profile Page */
.profile-header {
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
    padding: 2rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.profile-header-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.profile-header-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.edit-profile-btn {
    padding: 0.6rem 1.2rem;
    background: var(--steam-accent-blue-dark);
    color: white;
    border: none;
    border-radius: 2px;
    font-size: 0.875rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.edit-profile-btn:hover {
    background: var(--steam-accent-blue);
}

.edit-profile-btn.active {
    background: var(--steam-green);
}

.add-to-home-btn {
    padding: 0.6rem 1.2rem;
    background: var(--steam-green);
    color: white;
    border: none;
    border-radius: 2px;
    font-size: 0.875rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.add-to-home-btn:hover {
    background: var(--steam-green-bright);
}

.add-to-home-btn:active {
    background: var(--steam-green);
}

.profile-header h2 {
    font-size: 1.75rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--steam-text-primary);
}

.app-count {
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    color: var(--steam-text-secondary);
}

.app-count span {
    font-weight: 600;
    color: var(--steam-accent-blue);
}

.profile-pagination {
    max-width: 900px;
    margin: 2rem auto 1rem auto;
    padding: 0 1rem;
    text-align: center;
}

.profile-pagination-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pagination-btn {
    border: none;
    background: transparent;
    border-radius: 2px;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    font-family: 'Roboto', sans-serif;
    color: var(--steam-text-primary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--steam-accent-blue-dark);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: default;
    color: var(--steam-text-muted);
}

.pagination-info {
    font-size: 0.8rem;
    font-family: 'Roboto', sans-serif;
    color: var(--steam-text-secondary);
}

.profile-apps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
    background: var(--steam-bg-secondary);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Auth modal (login/register) */
.auth-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.auth-modal-content {
    position: relative;
    z-index: 1001;
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.auth-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    cursor: pointer;
}

.auth-modal-tabs {
    display: flex;
    border-radius: 999px;
    background: #f0f0f5;
    padding: 0.15rem;
    margin-bottom: 1rem;
}

.auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
}

.auth-tab.active {
    background: #667eea;
    color: #ffffff;
}

.auth-form {
    display: none;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-form.active {
    display: flex;
}

.auth-form input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.auth-submit-btn {
    margin-top: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-size: 0.95rem;
    cursor: pointer;
}

.auth-privy-btn {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 2px solid var(--steam-accent-blue, #66c0f4);
    background: transparent;
    color: var(--steam-accent-blue, #66c0f4);
    font-size: 0.95rem;
    cursor: pointer;
}

.auth-privy-btn:hover {
    background: rgba(102, 192, 244, 0.1);
}

.auth-error-message {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #ff4757;
    min-height: 1em;
}

.auth-agree-checkboxes {
    margin: 0.75rem 0 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-agree-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.4;
    cursor: pointer;
    color: var(--text-color, #333);
}

.auth-agree-label input[type="checkbox"] {
    width: auto;
    margin-top: 0.2em;
    flex-shrink: 0;
}

.auth-agree-label a {
    color: var(--primary, #667eea);
    text-decoration: underline;
}

.auth-agree-label a:hover {
    opacity: 0.85;
}

[data-theme="dark"] .auth-agree-label {
    color: #e0e0e0;
}

[data-theme="dark"] .auth-agree-label a {
    color: #8b9cf7;
}

/* Password match indicator */
#password-match-indicator {
    font-weight: bold;
    font-size: 1.1rem;
    user-select: none;
}

/* Dark mode for auth modal */
[data-theme="dark"] .auth-modal-content {
    background: #2a2a2a;
    color: #e0e0e0;
}

[data-theme="dark"] .auth-form input {
    background: #333;
    color: #e0e0e0;
    border-color: #444;
}

[data-theme="dark"] .auth-form input:focus {
    background: #3a3a3a;
    border-color: #667eea;
}

.profile-app-card {
    position: relative;
    width: 100%;
    min-height: 180px;
    transition: transform 0.2s, opacity 0.2s;
}

.profile-app-card.edit-mode {
    cursor: move;
}

.profile-app-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.profile-app-card.drag-over-left {
    border-left: 4px solid white;
    margin-left: -4px;
    box-shadow: -4px 0 0 0 rgba(255, 255, 255, 0.5);
}

.profile-app-card.drag-over-right {
    border-right: 4px solid white;
    margin-right: -4px;
    box-shadow: 4px 0 0 0 rgba(255, 255, 255, 0.5);
}

.profile-app-card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 150px;
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    padding: 0.9rem;
    transition: all 0.2s;
}

.profile-app-card:hover .profile-app-card-content {
    background: var(--steam-bg-secondary);
    border-color: var(--steam-accent-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.profile-app-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.profile-app-logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.profile-app-logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-app-logo {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.profile-app-logo-link:hover .profile-app-logo {
    transform: scale(1.05);
}

.profile-app-name-link {
    text-decoration: none;
    color: inherit;
    width: 100%;
    display: flex;
    justify-content: center;
}

.profile-app-name {
    font-size: 0.85rem;
    font-family: 'Roboto', sans-serif;
    color: var(--steam-text-primary);
    text-align: center;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s;
}

.profile-app-name-link:hover .profile-app-name {
    opacity: 0.8;
}

.profile-app-status-bar {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.profile-app-status-bar.status-none {
    background: rgba(255, 255, 255, 0.1);
}

.profile-app-status-bar.status-green {
    background: var(--steam-green);
}

.profile-app-status-bar.status-yellow {
    background: #8b6914;
}

.profile-app-status-bar.status-orange {
    background: #a66321;
}

.profile-app-status-bar.status-red {
    background: var(--steam-red);
}

.profile-app-more-info {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--steam-accent-blue-dark);
    color: white;
    border: 1px solid var(--steam-border);
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-top: auto;
}

.profile-app-more-info:hover {
    background: var(--steam-accent-blue);
    border-color: var(--steam-accent-blue);
}

.profile-app-more-info {
    position: relative;
}

.profile-app-event-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--steam-red);
    color: white;
    border-radius: 2px;
    font-size: 0.7rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    z-index: 5;
    border: 2px solid var(--steam-card-bg);
}

.profile-app-status-dot {
    position: absolute;
    bottom: -4px;
    left: -4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.profile-app-status-dot.status-green {
    background: var(--steam-green);
}

.profile-app-status-dot.status-yellow {
    background: #8b6914;
}

.profile-app-status-dot.status-orange {
    background: #a66321;
}

.profile-app-status-dot.status-red {
    background: #ff4757;
}

.remove-app-x {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 2px;
    background: var(--steam-red);
    color: white;
    border: 1px solid var(--steam-border);
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transition: background 0.2s;
    line-height: 1;
    padding: 0;
}

.remove-app-x:hover {
    background: var(--steam-red-bright);
}

.profile-app-star-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--steam-border);
    background: var(--steam-card-bg);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    z-index: 5;
}

.profile-app-star-btn:hover {
    color: #14F195;
    border-color: #14F195;
}

.profile-app-star-btn.starred {
    color: #14F195;
    border-color: #14F195;
    background: rgba(20, 241, 149, 0.15);
}

/* Legacy styles kept for backward compatibility if needed */
.homescreen-app-icon {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    transition: transform 0.2s, background 0.2s;
    cursor: pointer;
    width: 100%;
}

.homescreen-app-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.homescreen-app-link:hover {
    opacity: 0.9;
}

.more-info-btn {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
    backdrop-filter: blur(10px);
}

.more-info-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.homescreen-app-icon:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

.homescreen-app-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
}

.homescreen-app-name {
    font-size: 0.85rem;
    color: white;
    text-align: center;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 0.25rem;
}

.homescreen-app-status-bar {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    margin-top: 0.25rem;
}

.homescreen-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 71, 87, 0.9);
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.homescreen-app-icon:hover .homescreen-remove-btn {
    opacity: 1;
}

.homescreen-remove-btn:hover {
    background: rgba(255, 71, 87, 1);
    transform: scale(1.1);
}

.remove-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
    transition: background 0.2s;
}

.remove-btn:hover {
    background: #ff3838;
}

.empty-profile {
    text-align: center;
    padding: 3rem;
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    color: var(--steam-text-secondary);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
}

.empty-profile-cta {
    margin-top: 1rem;
    padding: 0.6rem 1.25rem;
    border-radius: 2px;
    border: none;
    background: var(--steam-accent-blue-dark);
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.empty-profile-cta:hover {
    background: var(--steam-accent-blue);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 0.4rem 0.5rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 0.4rem;
        align-items: center;
    }
    
    .logo {
        font-size: 0.9rem;
        text-align: center;
        width: 100%;
        margin: 0;
        order: 1;
    }
    
    /* Create a row for search and My Apps button */
    /* Wrapper for search box and nav buttons to be side by side */
    .nav-search-and-buttons {
        display: flex;
        width: 100%;
        gap: 0.3rem;
        align-items: center;
        order: 2;
        box-sizing: border-box;
    }
    
    .nav-search-box {
        flex: 1 1 auto;
        gap: 0.25rem;
        min-width: 0;
        margin: 0;
        display: flex;
        box-sizing: border-box;
    }
    
    .nav-search-box input {
        padding: 0.4rem 0.4rem;
        font-size: 0.75rem;
        border-radius: 8px;
        flex: 1 1 auto;
        min-width: 0;
        width: 0;
        box-sizing: border-box;
    }
    
    .nav-search-box button {
        padding: 0.4rem 0.5rem;
        font-size: 0.65rem;
        border-radius: 8px;
        white-space: nowrap;
        flex-shrink: 1;
        box-sizing: border-box;
    }
    
    .nav-buttons {
        gap: 0;
        flex-shrink: 1;
        display: flex;
        align-items: center;
        box-sizing: border-box;
        /* Prevent iOS Safari/Chrome from scaling nav with user font preferences */
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    .nav-btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.65rem;
        gap: 0.1rem;
        white-space: nowrap;
        box-sizing: border-box;
    }
    
    .app-count-badge {
        padding: 0.1rem 0.25rem;
        font-size: 0.55rem;
        min-width: 30px;
        box-sizing: border-box;
    }
    /* Fixed px sizes for nav icons - prevents iOS Safari/Chrome/Brave from scaling with user font preferences */
    .nav-myapps-icon {
        height: 32px !important;
        width: 32px !important;
        max-height: 32px !important;
        max-width: 32px !important;
    }
    .nav-account-icon {
        height: 32px !important;
        width: 32px !important;
        max-height: 32px !important;
        max-width: 32px !important;
    }
    .gm-btn-icon {
        height: 32px !important;
        max-height: 32px !important;
    }
    .gm-active-text,
    .gm-countdown-text {
        font-size: 10px !important;
    }
    .nav-account-label {
        font-size: 10px !important;
    }
    .app-count-badge-overlay {
        font-size: 10px !important;
        padding: 0.08rem 0.25rem;
        min-width: 28px;
    }
    /* Hide app counter on mobile - only show event badge */
    .app-count-badge-desktop-only {
        display: none !important;
    }
    /* Event badge: smaller font and padding on mobile (25% reduction) */
    .nav-myapps-event-badge {
        min-width: 15px !important;
        height: 15px !important;
        padding: 0 4px !important;
        font-size: 0.525rem !important;
    }
    
    /* Allow horizontal scroll on narrow screens so Community/Calendar icons stay accessible */
    .navbar {
        --nav-height: 48px;
        box-sizing: border-box;
        overflow-x: auto;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    .logo-image {
        height: 24px !important;
        max-height: 24px !important;
    }
    
    .nav-container {
        box-sizing: border-box;
        width: 100%;
    }
    

    .page {
        margin: 0.5rem auto;
        padding: 0 0.5rem;
    }

    .card-stack-wrapper {
        max-width: 100%;
        min-height: calc(100vh - 150px);
        padding-bottom: 200px;
    }
    
    .card-stack {
        max-width: 100%;
        min-height: calc(100vh - 150px);
        padding: 0;
        margin: 0 auto;
        height: auto;
    }

    .app-card {
        padding: 0.8rem;
        border-radius: 15px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        max-height: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Hide all cards except the first one on mobile */
    .app-card:not(:first-child) {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    
    .app-header {
        margin: 0.5rem 1rem 0.3rem;
        gap: 0.75rem;
    }
    
    .app-logo {
        width: 60px;
        height: 60px;
    }
    
    .app-name {
        font-size: 1.4rem;
    }
    
    .app-status-bar {
        width: 85%;
        margin: 0 auto 0.75rem;
        padding: 0.4rem 0;
    }
    
    .app-status-text {
        font-size: 0.75rem;
    }
    
    .screenshots-container {
        margin: 0 1rem 0.75rem;
    }
    
    .app-description-wrapper {
        margin: 0 1rem 1rem;
    }
    
    .app-description {
        font-size: 0.9em;
        line-height: 1.4;
    }
    
    .youtube-video-container {
        width: calc(100% - 2rem);
        margin: 0 1rem 0.75rem;
    }
    
    .app-card-buttons {
        margin: 0 1rem 1rem;
        gap: 0.5rem;
    }
    
    .app-status-bar-container {
        margin: 0 1rem 0.75rem;
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .app-status-bar {
        padding: 0.4rem 0.75rem;
        flex: 1 1 auto;
        min-width: 80px;
    }
    
    .app-status-text {
        font-size: 0.75rem;
    }
    
    .card-profile-btn-inline {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
        flex: 1 1 auto;
        min-width: fit-content;
    }
    
    .card-profile-btn,
    .card-website-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .card-action-buttons-top,
    .card-action-buttons-bottom {
        padding: 0.75rem 1rem;
    }
    
    .card-action-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .arrow-left,
    .arrow-right {
        font-size: 1rem;
    }


    .profile-apps {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .profile-app-card {
        min-height: 120px;
    }

    .profile-app-card-content {
        min-height: 120px;
        padding: 0.5rem;
    }

    .profile-app-logo {
        width: 44px;
        height: 44px;
    }

    .profile-app-name {
        font-size: 0.7rem;
    }

    .profile-app-more-info {
        font-size: 0.65rem;
        padding: 0.35rem 0.5rem;
    }
    
    /* Ensure cards fit on mobile screens */
    .swipe-container {
        min-height: calc(100vh - 150px);
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 0.5rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Make sure card content doesn't overflow */
    .app-card {
        max-height: none;
        overflow-y: visible;
        height: auto;
    }
    
    /* Ensure page container doesn't add extra spacing */
    #swipe-page {
        margin: 0;
        padding: 0;
        height: 100%;
        overflow-y: auto;
    }
    
    /* Make card stack scrollable */
    .card-stack {
        overflow: visible;
        height: auto;
    }
    
    /* Optimize spacing for mobile */
    .screenshot-display {
        aspect-ratio: 16 / 9;
    }
    
    .screenshot-nav-btn-overlay {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .screenshot-counter-overlay {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Very narrow phones: 2 apps per row in My Apps */
@media (max-width: 360px) {
    .profile-apps {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* App Detail Page */
.app-detail-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    background: white;
    min-height: 100vh;
    width: 100%;
}

.app-detail-content {
    width: 100%;
    max-width: 100%;
}

.app-detail-page.active {
    display: block;
}

.app-detail-close-btn {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.app-detail-close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.app-detail-title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.app-detail-title {
    font-size: 3rem;
    margin: 0;
    color: #333;
    font-weight: 700;
    flex: 1;
    min-width: 200px;
}

.app-detail-add-remove-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.app-detail-add-remove-btn.add {
    background: linear-gradient(135deg, #2ed573 0%, #1dd65a 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(46, 213, 115, 0.3);
}

.app-detail-add-remove-btn.add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 213, 115, 0.4);
}

.app-detail-add-remove-btn.remove {
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.app-detail-add-remove-btn.remove:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

.app-detail-add-remove-btn:active {
    transform: translateY(0);
}

.app-detail-section {
    margin-bottom: 3rem;
}

/* Two Column Layout for App Detail Page */
.app-detail-main-layout {
    display: grid !important;
    grid-template-columns: 1fr 350px !important;
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.app-detail-left-column-main {
    display: flex !important;
    flex-direction: column;
    gap: 2rem;
    min-width: 0; /* Allow flex items to shrink */
    grid-column: 1;
}

.app-detail-right-sidebar {
    display: flex !important;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0; /* Allow flex items to shrink */
    grid-column: 2;
}

.app-detail-sidebar-section {
    margin-bottom: 0;
}

/* Ecosystem Box Styling */
.app-detail-ecosystem-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.app-detail-ecosystem-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.app-detail-ecosystem-logo:hover {
    transform: scale(1.05);
}

.app-detail-ecosystem-name {
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
    display: inline-block;
    transition: color 0.2s;
}

.app-detail-ecosystem-name:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* Ecosystem Games List */
.app-detail-ecosystem-games-list {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.app-detail-ecosystem-games-list::-webkit-scrollbar {
    width: 6px;
}

.app-detail-ecosystem-games-list::-webkit-scrollbar-track {
    background: var(--steam-bg-secondary);
    border-radius: 3px;
}

.app-detail-ecosystem-games-list::-webkit-scrollbar-thumb {
    background: var(--steam-accent-blue-dark);
    border-radius: 3px;
}

.app-detail-ecosystem-games-list::-webkit-scrollbar-thumb:hover {
    background: var(--steam-accent-blue);
}

.app-detail-ecosystem-game-item {
    transition: background 0.2s, transform 0.2s;
}

.app-detail-ecosystem-game-item:hover {
    background: var(--steam-nav-secondary) !important;
    transform: translateX(2px);
}

.app-detail-ecosystem-game-item:last-child {
    margin-bottom: 0 !important;
}

/* Dark theme for ecosystem games */
[data-theme="dark"] .app-detail-ecosystem-game-item {
    background: #2a2a2a !important;
    border-color: #444 !important;
}

[data-theme="dark"] .app-detail-ecosystem-game-item:hover {
    background: #333 !important;
}

/* Full-width Ecosystem Projects Section */
.app-detail-ecosystem-projects-section {
    width: 100%;
    margin-bottom: 2rem;
}

.app-detail-ecosystem-projects-title {
    font-size: 1.8rem;
    margin: 0 0 0.5rem 0;
    color: var(--steam-text-primary);
    font-weight: 600;
}

.app-detail-ecosystem-projects-subtitle {
    margin: 0 0 1.5rem 0;
    color: var(--steam-text-secondary);
    font-size: 0.95rem;
}

.app-detail-ecosystem-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.app-detail-ecosystem-project-card {
    background: var(--steam-bg-secondary);
    border: 1px solid var(--steam-border);
    border-radius: 8px;
    padding: 1rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 200px;
}

.app-detail-ecosystem-project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--steam-accent-blue);
}

.app-detail-ecosystem-project-logo {
    width: 50px !important;
    height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    object-fit: contain;
    border-radius: 4px;
    background: var(--steam-card-bg);
    padding: 4px;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
    display: block;
}

.app-detail-ecosystem-project-name {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--steam-text-primary);
    line-height: 1.3;
}

.app-detail-ecosystem-project-description {
    margin: 0;
    color: var(--steam-text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-detail-ecosystem-projects-note {
    margin: 1rem 0 0 0;
    color: var(--steam-text-muted);
    font-size: 0.85rem;
    text-align: center;
}

/* Dark theme for ecosystem projects section */
[data-theme="dark"] .app-detail-ecosystem-projects-section {
    background: #1e1e1e;
    border-color: #333;
}

[data-theme="dark"] .app-detail-ecosystem-project-card {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .app-detail-ecosystem-project-card:hover {
    background: #333;
    border-color: var(--steam-accent-blue);
}

[data-theme="dark"] .app-detail-ecosystem-project-logo {
    background: #1e1e1e;
}

/* Mobile responsiveness for ecosystem projects grid */
@media (max-width: 768px) {
    .app-detail-ecosystem-projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .app-detail-ecosystem-project-card {
        min-height: 180px;
        padding: 0.75rem;
    }
    
    .app-detail-ecosystem-project-logo {
        width: 50px !important;
        height: 50px !important;
        max-width: 50px !important;
        max-height: 50px !important;
    }
    
    .app-detail-ecosystem-projects-section {
        padding: 1.5rem 0.75rem;
    }
}

.app-detail-section h3 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.app-detail-section h2 {
    margin-top: 0;
}

.app-detail-description {
    font-size: 1.2em;
    line-height: 1.8;
    color: #444;
    margin-bottom: 1rem;
}

.app-detail-description p {
    font-size: 1em;
}

.app-detail-full-info {
    font-size: 1.1em;
    line-height: 1.8;
    color: #555;
}

.app-detail-full-info p {
    margin-bottom: 1rem;
}

.app-detail-full-info img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
}

.app-detail-screenshots-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 0;
    margin-top: 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f0f0f0;
}

.app-detail-screenshots-scroll::-webkit-scrollbar {
    height: 8px;
}

.app-detail-screenshots-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.app-detail-screenshots-scroll::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.app-detail-screenshots-scroll::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

.app-detail-screenshot-scroll {
    flex: 0 0 auto;
    width: 600px;
    max-width: 80vw;
    height: 400px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    scroll-snap-align: start;
    background: #f7f7f7;
}

.youtube-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

.youtube-container .youtube-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.app-detail-event {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 10px;
}

.app-detail-event-current {
    background: #f7f7f7;
    border-left: 4px solid #2ed573;
}

.app-detail-event-upcoming {
    background: #fff8e1;
    border-left: 4px solid #ffa502;
}

.app-detail-event h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2em;
    color: #333;
}

.app-detail-event-description {
    margin: 0 0 0;
    color: #666;
    font-size: 1em;
    line-height: 1.6;
}

.app-detail-event-description > div {
    margin-bottom: 0 !important;
}

.app-detail-event-description > div:last-child {
    margin-bottom: 0 !important;
}

.app-detail-event-description > div p:last-child {
    margin-bottom: 0 !important;
}

.app-detail-event-description h1,
.app-detail-event-description h2,
.app-detail-event-description h3,
.app-detail-event-description h4,
.app-detail-event-description h5,
.app-detail-event-description h6 {
    color: #333;
    margin: 0.5rem 0 0.5rem 0;
    font-weight: 600;
}

.app-detail-event-description h1 { font-size: 1.5rem; }
.app-detail-event-description h2 { font-size: 1.3rem; }
.app-detail-event-description h3 { font-size: 1.1rem; }
.app-detail-event-description h4 { font-size: 1rem; }
.app-detail-event-description h5 { font-size: 0.95rem; }
.app-detail-event-description h6 { font-size: 0.9rem; }

.app-detail-event-description p {
    font-size: 1em;
    margin: 0.5rem 0;
}

.app-detail-event-description ul,
.app-detail-event-description ol {
    margin: 0.5rem 0 0.5rem 1.5rem;
    padding-left: 1.5rem;
}

.app-detail-event-description li {
    margin: 0.25rem 0;
}

.app-detail-event-description strong,
.app-detail-event-description b {
    font-weight: 600;
    color: #333;
}

.app-detail-event-description em,
.app-detail-event-description i {
    font-style: italic;
}

.app-detail-event-description a {
    color: #667eea;
    text-decoration: none;
}

.app-detail-event-description a:hover {
    text-decoration: underline;
}

.app-detail-event-description blockquote {
    border-left: 3px solid #ddd;
    padding-left: 1rem;
    margin: 0.5rem 0;
    color: #888;
    font-style: italic;
}

.app-detail-event-description code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

.app-detail-event-description pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.app-detail-event-description pre code {
    background: none;
    padding: 0;
}

.app-detail-event-meta {
    font-size: 0.9em;
    color: #999;
}

.app-detail-website-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.app-detail-website-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.app-detail-error {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.app-detail-error h2 {
    color: #ff4757;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .app-detail-title-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .app-detail-title {
        font-size: 2rem;
        width: 100%;
    }
    
    .app-detail-add-remove-btn {
        width: 100%;
    }
    
    .app-detail-screenshot-scroll {
        width: 90vw;
        height: 300px;
    }
    
    .app-detail-section h3 {
        font-size: 1.5rem;
    }
    
    /* Single column layout on mobile */
    .app-detail-main-layout {
        grid-template-columns: 1fr !important;
    }
    
    .app-detail-right-sidebar {
        order: 2;
    }
    
    .app-detail-left-column-main {
        order: 1;
    }
}

/* Footer */
.app-footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem 1rem;
    margin-top: auto;
    width: 100%;
    flex-shrink: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--steam-text-secondary);
    font-family: 'Roboto', sans-serif;
    font-size: 0.875rem;
}

.footer-content p {
    margin: 0.5rem 0;
}

.footer-content a {
    color: var(--steam-accent-blue);
    text-decoration: underline;
    transition: color 0.2s;
}

.footer-content a:hover {
    color: var(--steam-accent-blue);
    opacity: 0.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-links a {
    text-decoration: none;
}

.footer-x-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-x-link svg {
    width: 1rem;
    height: 1rem;
}

/* Legal & support page content container */
.legal-page-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}

.legal-page-container h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.legal-page-container h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.legal-page-container h3 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.legal-page-container p,
.legal-page-container ul,
.legal-page-container li {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.legal-page-container ul {
    margin-left: 2rem;
}

.legal-page-container .last-updated {
    font-style: italic;
    color: #666;
    margin-bottom: 2rem;
}

.legal-page-container .back-link {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background: var(--button-blue);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: 2px solid var(--border-color);
    font-weight: bold;
}

.legal-page-container .back-link:hover {
    background: var(--button-green);
}

.legal-page-container .contact-email {
    font-weight: bold;
    color: var(--button-blue);
}

/* Account Page Styles */
.account-page {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.account-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.account-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.account-title {
    font-size: 2.5rem;
    margin: 0;
    color: #333;
    flex: 1;
}

.account-logout-btn {
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: lowercase;
    color: #1a1a1a;
    background: #ff4757;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.account-logout-btn:hover {
    background: #ff6b7a;
    transform: translateY(-1px);
}

.account-logout-btn:active {
    transform: translateY(0);
}

[data-theme="dark"] .account-logout-btn {
    color: #fff;
    background: #ff4757;
}

[data-theme="dark"] .account-logout-btn:hover {
    background: #ff6b7a;
}

.account-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.account-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.account-section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.account-form-group {
    margin-bottom: 1.25rem;
}

.account-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.account-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.account-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.account-input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.account-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-top: 0.5rem;
}

.account-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.account-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.account-btn-primary:active {
    transform: translateY(0);
}

.account-btn-danger {
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.account-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

.account-btn-danger:active {
    transform: translateY(0);
}

.account-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.account-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.account-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.referrals-description { margin-bottom: 1rem; color: var(--steam-text-secondary); line-height: 1.5; }
.referral-generate-area { margin-top: 1rem; }
.referral-link-area { margin-top: 1rem; }
.referral-link-display { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.referral-link-display input { flex: 1; min-width: 0; }
.referral-link-display .account-btn { flex-shrink: 0; padding: 0.5rem 1rem; min-width: 5rem; }

.account-role-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.account-role-label {
    font-weight: 600;
    color: #555;
}

.account-role-value {
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: capitalize;
}

/* Dark mode for Account Page */
[data-theme="dark"] .account-container {
    background: #2a2a2a;
    color: #e0e0e0;
}

[data-theme="dark"] .account-title {
    color: #e0e0e0;
}

[data-theme="dark"] .account-section-title {
    color: #e0e0e0;
    border-bottom-color: #667eea;
}

[data-theme="dark"] .account-form-group label {
    color: #ccc;
}

[data-theme="dark"] .account-input {
    background: #333;
    color: #e0e0e0;
    border-color: #444;
}

[data-theme="dark"] .account-input:focus {
    border-color: #667eea;
    background: #3a3a3a;
}

[data-theme="dark"] .account-input[readonly] {
    background-color: #2a2a2a;
}

[data-theme="dark"] .account-section {
    border-bottom-color: #444;
}

[data-theme="dark"] .account-role-display {
    background: #333;
}

[data-theme="dark"] .account-role-label {
    color: #ccc;
}

/* Profile Passport Style Layout */
.profile-passport-section {
    border: none;
    border-radius: 0;
    padding: 2rem;
    background: transparent;
    position: relative;
    overflow: visible;
}

/* Card Controls */
.profile-card-controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.share-passport-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #14F195;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(20, 241, 149, 0.15) 0%, rgba(20, 241, 149, 0.05) 100%);
    color: #14F195;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.share-passport-btn:hover {
    background: linear-gradient(135deg, #14F195 0%, #0dd178 100%);
    color: #0a0a0a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 241, 149, 0.4);
}

.share-passport-btn:active {
    transform: translateY(0);
}

.download-passport-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #667eea;
    border-radius: 6px;
    background: white;
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.download-passport-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.download-passport-btn:active {
    transform: translateY(0);
}

.download-passport-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.download-passport-btn svg {
    width: 18px;
    height: 18px;
}

#profile-passport-card {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
    background: linear-gradient(160deg, #1a1a2e 0%, #16213e 50%, #0f0f1a 100%);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

/* Background overlay for dynamic colors */
.profile-card-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
    background-size: cover;
    background-position: center;
}

/* Background patterns */
#profile-passport-card[data-pattern="dots"] .profile-card-background-overlay {
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='1.5' fill='%23000' opacity='0.1'/%3E%3C/svg%3E");
}

#profile-passport-card[data-pattern="grid"] .profile-card-background-overlay {
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 40 0 L 0 0 0 40' fill='none' stroke='%23000' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E");
}

#profile-passport-card[data-pattern="diagonal"] .profile-card-background-overlay {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 0 60 L 60 0' fill='none' stroke='%23000' stroke-width='1' opacity='0.08'/%3E%3C/svg%3E");
}

.download-passport-icon-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.download-passport-icon-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.download-passport-icon-btn:active {
    transform: scale(0.95);
}

.download-passport-icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.download-passport-icon-btn svg {
    width: 18px;
    height: 18px;
}

/* New card layout */
.profile-passport-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    z-index: 1;
    padding: 2rem 2rem 1.25rem;
}

.profile-card-hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.profile-card-avatar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 120px;
}

.profile-pic-container {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    border: 3px solid rgba(102, 126, 234, 0.6);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.profile-pic-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-pic-placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.profile-pic-placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

/* XP bar below avatar */
.profile-xp-bar-wrap {
    width: 100%;
    margin-top: 0.5rem;
}

.profile-xp-bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.profile-xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #14F195 0%, #0dd178 100%);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.profile-xp-bar-labels {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.profile-xp-current {
    font-weight: 700;
    color: #14F195;
}

.profile-xp-sep {
    color: rgba(255, 255, 255, 0.4);
}

.profile-xp-next {
    color: rgba(255, 255, 255, 0.6);
}

.profile-xp-label {
    color: rgba(255, 255, 255, 0.5);
    margin-left: 0.15rem;
}

.profile-stat-streak-icon {
    font-size: 0.9em;
}

.profile-card-identity {
    flex: 1;
    min-width: 0;
}

.profile-nickname {
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.profile-member-since {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 1rem 0;
    position: relative;
    z-index: 1;
}

.profile-card-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.profile-stat-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #14F195;
}

.profile-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.profile-card-logo-wrap {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    max-width: 80px;
}

.profile-card-logo {
    height: 19px;
    max-height: 19px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    opacity: 0.6;
}

/* Profile logo (index.php variant) - keep consistent with card logo */
.profile-logo-container {
    max-width: 80px;
}

.profile-logo {
    height: 19px;
    max-height: 19px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
}

.profile-traits-intro {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

[data-theme="dark"] .profile-traits-intro {
    color: rgba(255, 255, 255, 0.5);
}

.profile-favorite-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.favorite-label {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

.favorite-dominance {
    font-size: 0.9rem;
    color: #888;
    font-weight: 500;
}

.profile-favorites-empty {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.profile-favorites-empty p {
    font-size: 0.95rem;
    color: #999;
    font-style: italic;
    margin: 0;
}

/* Ensure tags in favorites match the style from app detail pages */
.profile-favorites .tag {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

[data-theme="dark"] .profile-favorites {
    border-top-color: #444;
}

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

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

[data-theme="dark"] .profile-favorites-empty {
    border-top-color: #444;
}

[data-theme="dark"] .profile-favorites-empty p {
    color: #999;
}

[data-theme="dark"] .profile-passport-section {
    background: transparent;
}

[data-theme="dark"] #profile-passport-card {
    background: linear-gradient(160deg, #1a1a2e 0%, #16213e 50%, #0f0f1a 100%);
    border-color: rgba(102, 126, 234, 0.4);
}

[data-theme="dark"] .share-passport-btn {
    background: rgba(20, 241, 149, 0.1);
    border-color: #14F195;
    color: #14F195;
}

[data-theme="dark"] .share-passport-btn:hover {
    background: linear-gradient(135deg, #14F195 0%, #0dd178 100%);
    color: #0a0a0a;
}

[data-theme="dark"] .download-passport-btn {
    background: #2a2a2a;
    border-color: #667eea;
    color: #667eea;
}

[data-theme="dark"] .download-passport-btn:hover {
    background: #667eea;
    color: white;
}

[data-theme="dark"] .stat-value {
    color: #667eea;
}

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

[data-theme="dark"] .profile-stats {
    border-top-color: #444;
    border-bottom-color: #444;
}

/* Donut + Featured apps row */
.profile-vibe-row {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 1;
}

.profile-traits-chart-wrap {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 140px;
}

.profile-chart-label {
    font-size: 0.7rem !important;
    margin: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.profile-featured-apps-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.profile-traits-bars {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.profile-trait-bar-row {
    min-height: 28px;
}

.profile-trait-bar-track {
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.profile-trait-bar-fill {
    height: 100%;
    min-width: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    transition: width 0.5s ease;
}

.profile-trait-bar-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.profile-featured-apps {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    min-height: 48px;
    flex-wrap: wrap;
}

.profile-featured-app-link {
    display: block;
    width: 58px;
    height: 58px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-featured-app-link:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.profile-featured-app-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Edit featured apps section */
.featured-apps-edit-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--steam-border);
}

.featured-apps-edit-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.featured-apps-edit-desc {
    font-size: 0.9rem;
    color: var(--steam-text-secondary);
    margin: 0 0 1rem 0;
}

.featured-apps-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.featured-app-picker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 2px solid var(--steam-border);
    background: var(--steam-bg-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.featured-app-picker-item:hover {
    border-color: var(--steam-accent-blue);
}

.featured-app-picker-item.starred {
    border-color: #14F195;
    background: rgba(20, 241, 149, 0.1);
}

.featured-app-picker-item img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.featured-app-picker-item .star-icon {
    font-size: 1.1rem;
    opacity: 0.4;
}

.featured-app-picker-item.starred .star-icon {
    opacity: 1;
    color: #14F195;
}

/* Personal Traits message */
.profile-traits-message {
    text-align: center;
    padding: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.profile-traits-gauges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0;
}

/* Compact trait pills with mini progress */
.profile-trait-bar {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 100px;
    flex: 1;
    max-width: 180px;
}

.trait-bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.trait-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
    box-shadow: 0 0 8px currentColor;
}

.trait-bar-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.trait-bar-percent {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    min-width: 3.5ch;
}

.trait-bar-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .trait-bar-track {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .trait-bar-percent {
    color: #fff;
}

[data-theme="dark"] .trait-bar-label {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .profile-traits-container {
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .profile-traits-message {
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive adjustments for traits */
@media (max-width: 768px) {
    .profile-traits-gauges {
        gap: 0.875rem;
    }
}

[data-theme="dark"] .download-passport-icon-btn {
    background: #2a2a2a;
    border-color: #667eea;
    color: #667eea;
}

[data-theme="dark"] .download-passport-icon-btn:hover {
    background: #667eea;
    color: white;
}

[data-theme="dark"] .profile-pic-container {
    background: #333;
    border-color: #667eea;
}

[data-theme="dark"] .profile-pic-placeholder {
    color: #999;
}

[data-theme="dark"] .profile-nickname {
    color: #fff;
}

[data-theme="dark"] .profile-member-since {
    color: rgba(255, 255, 255, 0.5);
}

/* Profile Picture Upload Styles */
.profile-pic-upload-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-pic-preview-container {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-pic-placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.delete-profile-pic-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ff4757;
    background: white;
    color: #ff4757;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.delete-profile-pic-btn:hover {
    background: #ff4757;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.5);
}

.delete-profile-pic-btn:active {
    transform: scale(0.95);
}

.delete-profile-pic-btn svg {
    width: 14px;
    height: 14px;
}

.profile-pic-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-pic-preview-placeholder {
    color: #999;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.profile-pic-upload-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-pic-hint {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.profile-pic-avatar-generator {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.avatar-generator-label {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 0.5rem 0;
}

.avatar-generator-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.avatar-generator-buttons .account-btn {
    width: auto;
}

.avatar-generator-buttons .account-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

[data-theme="dark"] .profile-pic-avatar-generator {
    border-top-color: #444;
}

[data-theme="dark"] .avatar-generator-label {
    color: #ccc;
}

.profile-pic-crop-container {
    margin-top: 1rem;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
}

.crop-preview-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    max-width: 100%;
    overflow: auto;
}

#profile-pic-crop-canvas {
    max-width: 100%;
    height: auto;
    border: 2px solid #667eea;
    border-radius: 8px;
    cursor: crosshair;
}

.crop-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.crop-controls .account-btn {
    width: auto;
    min-width: 120px;
}

[data-theme="dark"] .profile-pic-preview-container {
    background: #333;
    border-color: #444;
}

[data-theme="dark"] .delete-profile-pic-btn {
    background: #2a2a2a;
    border-color: #ff4757;
}

[data-theme="dark"] .delete-profile-pic-btn:hover {
    background: #ff4757;
    color: white;
}

[data-theme="dark"] .profile-pic-preview-placeholder {
    color: #999;
}

[data-theme="dark"] .profile-pic-hint {
    color: #ccc;
}

[data-theme="dark"] .profile-pic-crop-container {
    background: #2a2a2a;
    border-color: #444;
}

/* Responsive Design for Profile Passport */
@media (max-width: 768px) {
    #profile-passport-card {
        padding: 1.25rem 1.25rem 1rem;
        max-width: 520px;
        width: 100%;
    }
    
    .profile-passport-card {
        padding: 0;
    }
    
    .profile-card-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .profile-card-avatar-column {
        width: 96px;
    }
    
    .profile-card-identity {
        width: 100%;
    }
    
    .profile-pic-container {
        width: 96px;
        height: 96px;
        border-radius: 16px;
        border-width: 2px;
    }
    
    .profile-xp-bar-wrap {
        width: 100%;
    }
    
    .profile-vibe-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .profile-featured-apps-wrap {
        align-items: flex-start;
        width: 100%;
    }
    
    .profile-featured-apps {
        justify-content: flex-start;
        width: 100%;
        flex-wrap: wrap;
    }
    
    .profile-featured-app-link {
        width: 48px;
        height: 48px;
    }
    
    .profile-trait-bar-row {
        min-height: 24px;
    }
    
    .profile-trait-bar-track {
        height: 22px;
    }
    
    .profile-trait-bar-text {
        font-size: 0.7rem;
    }
    
    .profile-nickname {
        font-size: 1.75rem;
        text-align: center;
    }
    
    .profile-member-since {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
        text-align: center;
    }
    
    .profile-card-stats-row {
        justify-content: center;
    }
    
    .profile-stat-pill {
        padding: 0.35rem 0.7rem;
    }
    
    .profile-stat-value {
        font-size: 1rem;
    }
    
    .profile-stat-label {
        font-size: 0.75rem;
    }
    
    .profile-traits-intro {
        font-size: 0.7rem;
        margin-bottom: 0.6rem;
    }
    
    .profile-traits-container {
        margin: 0;
        padding: 1rem 0;
    }
    
    .profile-traits-gauges {
        gap: 0.5rem;
        flex-direction: column;
    }
    
    .profile-trait-bar {
        max-width: none;
    }
    
    .trait-bar-track {
        height: 6px;
    }
    
    .trait-bar-percent {
        font-size: 0.85rem;
    }
    
    .trait-bar-label {
        font-size: 0.8rem;
    }
    
    .profile-card-logo {
        height: 19px;
        max-height: 19px;
    }
}

[data-theme="dark"] .account-message-success {
    background-color: #1e4620;
    color: #90ee90;
    border-color: #2d5a2d;
}

[data-theme="dark"] .account-message-error {
    background-color: #4a1e1e;
    color: #ff9999;
    border-color: #5a2d2d;
}

/* Font Size Selector Styles */
.font-size-selector {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: nowrap;
}

.font-size-option {
    flex: 1;
    min-width: 0;
    aspect-ratio: 1;
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.font-size-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.font-size-option.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.font-size-label {
    font-weight: 600;
    font-size: 0.7rem;
    line-height: 1.1;
}

.font-size-preview {
    font-weight: bold;
    font-size: 1.25rem;
    line-height: 1;
}

.font-size-option[data-size="small"] .font-size-preview {
    font-size: 0.9rem;
}

.font-size-option[data-size="standard"] .font-size-preview {
    font-size: 1.1rem;
}

.font-size-option[data-size="bigger"] .font-size-preview {
    font-size: 1.3rem;
}

.font-size-option[data-size="huge"] .font-size-preview {
    font-size: 1.5rem;
}

.font-size-preview-text {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    margin-top: 1rem;
}

.font-size-preview-text p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

/* Preview text with different font sizes */
.font-size-preview-small {
    font-size: 0.85rem;
}

.font-size-preview-standard {
    font-size: 1rem;
}

.font-size-preview-bigger {
    font-size: 1.15rem;
}

.font-size-preview-huge {
    font-size: 1.32rem;
}

/* Setting checkbox wrapper */
.setting-checkbox-wrapper {
    margin-top: 1rem;
}

.setting-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
}

.setting-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #667eea;
}

.setting-description {
    margin-top: 0.75rem;
    margin-left: 0;
    padding-left: 0;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
}

[data-theme="dark"] .setting-checkbox-label {
    color: #e0e0e0;
}

[data-theme="dark"] .setting-description {
    color: #999;
}

/* Dark mode for Font Size Selector */
[data-theme="dark"] .font-size-option {
    background: #333;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .font-size-option:hover {
    border-color: #667eea;
    background: #3a3a3a;
}

[data-theme="dark"] .font-size-option.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

[data-theme="dark"] .font-size-preview-text {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .font-size-preview-text p {
    color: #ccc;
}

/* Contribute Section */
.contribute-section {
    border-top: 2px solid #e0e0e0;
    padding-top: 2rem;
    margin-top: 1rem;
}

.contribute-description {
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.contribute-form-group {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.contribute-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.account-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.contribute-history {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.submissions-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.submissions-empty {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-style: italic;
}

.submissions-error {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
}

.submissions-group {
    margin-bottom: 2rem;
}

.submissions-group h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #555;
}

.submissions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.submission-item {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.2s;
}

.submission-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.submission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.submission-title {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.submission-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.submission-status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.submission-status-approved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}

.submission-status-rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #dc3545;
}

.submission-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.submission-link {
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
}

.submission-link:hover {
    text-decoration: underline;
}

.submission-date {
    color: #999;
    font-size: 0.85rem;
}

.submission-admin-notes {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #e7f3ff;
    border-left: 3px solid #667eea;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #004085;
}

/* Dark mode for Contribute Section */
[data-theme="dark"] .contribute-section {
    border-top-color: #444;
}

[data-theme="dark"] .contribute-description {
    color: #ccc;
}

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

[data-theme="dark"] .contribute-subtitle {
    color: #e0e0e0;
    border-bottom-color: #667eea;
}

[data-theme="dark"] .contribute-history {
    border-top-color: #444;
}

[data-theme="dark"] .submissions-group h4 {
    color: #ccc;
}

[data-theme="dark"] .submission-item {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .submission-title {
    color: #e0e0e0;
}

[data-theme="dark"] .submission-status-pending {
    background: #664d03;
    color: #ffc107;
    border-color: #856404;
}

[data-theme="dark"] .submission-status-approved {
    background: #1e4620;
    color: #90ee90;
    border-color: #2d5a2d;
}

[data-theme="dark"] .submission-status-rejected {
    background: #4a1e1e;
    color: #ff9999;
    border-color: #5a2d2d;
}

[data-theme="dark"] .submission-link {
    color: #8fa3ff;
}

[data-theme="dark"] .submission-date {
    color: #999;
}

[data-theme="dark"] .submission-admin-notes {
    background: #004085;
    border-left-color: #667eea;
    color: #b3d9ff;
}

/* Account Management rows (Profile+Picture, Email+Password side-by-side on desktop) */
.account-management-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
}

@media (min-width: 769px) {
    .account-management-row {
        flex-direction: row;
        gap: 2rem;
        align-items: flex-start;
        margin-bottom: 2rem;
        padding-bottom: 2rem;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .account-management-row .account-section-half {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }
}

/* Account Management Section */
.account-management-section {
    border-top: 2px solid #e0e0e0;
    padding-top: 2rem;
    margin-top: 1rem;
}

.account-management-intro {
    margin-bottom: 1rem;
    line-height: 1.5;
    color: #555;
}

.account-management-intro .account-link {
    color: var(--steam-accent-blue, #66c0f4);
    text-decoration: none;
}

.account-management-intro .account-link:hover {
    text-decoration: underline;
}

.account-management-download-label {
    margin: 0.75rem 0 0.5rem;
    font-weight: 600;
    color: #333;
}

.account-management-download-list {
    margin: 0 0 1.25rem 2rem;
    padding: 0 0 0 1.5rem;
    line-height: 1.6;
    color: #555;
}

.account-management-delete-note {
    margin-bottom: 1.25rem;
    line-height: 1.5;
    color: #555;
}

.account-management-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.account-btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.account-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.account-btn-delete {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    font-weight: 700;
}

.account-btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

.account-btn-delete:active {
    transform: translateY(0);
}

/* Delete Account Modal */
.account-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.account-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.account-modal-content {
    position: relative;
    z-index: 2001;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.account-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0.25rem 0.5rem;
}

.account-modal-close:hover {
    color: #333;
}

.account-modal-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #333;
}

.account-modal-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #856404;
}

.account-modal-info {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #004085;
    font-size: 0.9rem;
}

.account-modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.account-modal-buttons .account-btn {
    flex: 1;
    margin-top: 0;
}

/* Dark mode for Account Management */
[data-theme="dark"] .account-management-row {
    border-bottom-color: #444;
}

[data-theme="dark"] .account-management-section {
    border-top-color: #444;
}

[data-theme="dark"] .account-management-intro {
    color: #b0b0b0;
}

[data-theme="dark"] .account-management-download-label {
    color: #e0e0e0;
}

[data-theme="dark"] .account-management-download-list {
    color: #b0b0b0;
}

[data-theme="dark"] .account-management-delete-note {
    color: #b0b0b0;
}

[data-theme="dark"] .account-modal-content {
    background: #2a2a2a;
    color: #e0e0e0;
}

[data-theme="dark"] .account-modal-title {
    color: #e0e0e0;
}

[data-theme="dark"] .account-modal-warning {
    background: #664d03;
    border-color: #856404;
    color: #ffc107;
}

[data-theme="dark"] .account-modal-info {
    background: #004085;
    border-color: #0056b3;
    color: #b3d9ff;
}

[data-theme="dark"] .account-modal-close {
    color: #ccc;
}

[data-theme="dark"] .account-modal-close:hover {
    color: #fff;
}

/* Responsive styles for Account Page */
@media (max-width: 768px) {
    .account-page {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .account-container {
        padding: 1.5rem;
    }
    
    .account-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .account-section-title {
        font-size: 1.25rem;
    }
    
    .account-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .font-size-option {
        padding: 0.4rem;
    }
    
    .font-size-label {
        font-size: 0.6rem;
    }
    
    .account-management-buttons {
        flex-direction: column;
    }
    
    .account-management-buttons .account-btn {
        width: 100%;
    }
    
    .contribute-form-group {
        padding: 1rem;
    }
    
    /* Account Dropdown Mobile - Full Screen Overlay */
    /* Only apply full-screen styles when dropdown is open (has .dropdown-open class) */
    .account-dropdown-menu.dropdown-open {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        border-radius: 0 !important;
        padding: 2rem !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px);
        z-index: 10000 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    [data-theme="dark"] .account-dropdown-menu.dropdown-open {
        background: rgba(30, 30, 30, 0.98) !important;
    }
    
    .account-dropdown-item {
        font-size: 1.5rem !important;
        padding: 1.5rem 2rem !important;
        width: 100% !important;
        max-width: 400px !important;
        text-align: center !important;
        border-radius: 12px !important;
        margin: 0.5rem 0 !important;
    }
    
    .account-dropdown-divider {
        width: 100% !important;
        max-width: 400px !important;
        margin: 1rem 0 !important;
    }
    
    .account-dropdown-logout {
        margin-top: 2rem !important;
    }
}

/* Account Dropdown Styles */
.account-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.account-dropdown-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.account-role-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-transform: capitalize;
    margin-top: 0.125rem;
}

.account-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 0.5rem 0;
    z-index: 1000;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.account-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    cursor: pointer;
    font-size: 0.95rem;
}

.account-dropdown-item:hover {
    background-color: #f5f5f5;
}

.account-dropdown-item.active {
    background-color: #667eea;
    color: white;
}

.account-dropdown-item.active:hover {
    background-color: #5568d3;
}

.account-dropdown-logout {
    color: #dc3545;
}

.account-dropdown-logout:hover {
    background-color: #fff5f5;
    color: #c82333;
}

.dropdown-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.account-dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0.5rem 0;
}

/* Dark mode for dropdown */
[data-theme="dark"] .account-dropdown-menu {
    background: #2a2a2a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .account-dropdown-item {
    color: #e0e0e0;
}

[data-theme="dark"] .account-dropdown-item:hover {
    background-color: #333;
}

[data-theme="dark"] .account-dropdown-item.active {
    background-color: #667eea;
    color: white;
}

[data-theme="dark"] .account-dropdown-divider {
    background: #444;
}

[data-theme="dark"] .account-dropdown-logout:hover {
    background-color: #3a2525;
}

/* Account Breadcrumb */
.account-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.breadcrumb-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.breadcrumb-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

.breadcrumb-link.active {
    color: #333;
    font-weight: 600;
    cursor: default;
    text-decoration: none;
}

.breadcrumb-separator {
    color: #999;
    font-size: 0.9rem;
}

[data-theme="dark"] .account-breadcrumb {
    border-bottom-color: #444;
}

[data-theme="dark"] .breadcrumb-link {
    color: #8a9eff;
}

[data-theme="dark"] .breadcrumb-link:hover {
    color: #a0b0ff;
}

[data-theme="dark"] .breadcrumb-link.active {
    color: #e0e0e0;
}

.notification-tab-badge {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--steam-accent-blue);
    margin-left: 0.15rem;
}

[data-theme="dark"] .notification-tab-badge {
    color: #8a9eff;
}

[data-theme="dark"] .breadcrumb-separator {
    color: #666;
}

/* Account Section Content with Fade Transitions */
.account-section-content {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.account-section-content.active {
    opacity: 1;
}

.account-section-content {
    display: none;
}

.account-section-content.active {
    display: block;
}

    .submission-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .submission-status {
        align-self: flex-start;
    }
    
    .account-modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .account-modal-buttons {
        flex-direction: column;
    }
    
    .account-modal-buttons .account-btn {
        width: 100%;
    }
}

/* ============================================
   Steam-Style App Detail Page (app-detail.php)
   ============================================ */

/* Breadcrumb Navigation */
.breadcrumb-container {
    background: var(--steam-nav-bg);
    border-bottom: 1px solid var(--steam-border);
    padding: 0.75rem 2rem;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: var(--steam-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: var(--steam-accent-blue);
}

.breadcrumb-item.breadcrumb-current {
    color: var(--steam-text-primary);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--steam-text-muted);
    margin: 0 0.25rem;
}

/* App Detail Page Wrapper */
.app-detail-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header Section */
.app-detail-header-steam {
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.app-detail-header-content {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.app-detail-logo-container {
    position: relative;
    flex-shrink: 0;
}

.app-detail-logo-steam {
    width: 130px;
    height: 130px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #000;
    background: var(--steam-bg-secondary);
    padding: 8px;
}

.app-detail-status-overlay {
    position: absolute;
    top: -8px;
    right: -8px;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #000;
    z-index: 10;
}

.app-detail-status-overlay.status-green {
    background: var(--steam-green);
    color: white;
}

.app-detail-status-overlay.status-yellow {
    background: #8b6914;
    color: white;
}

.app-detail-status-overlay.status-red {
    background: var(--steam-red);
    color: white;
}

.app-detail-status-overlay.status-gray {
    background: #4a5568;
    color: white;
}

.app-detail-title-section {
    flex: 1;
    min-width: 200px;
}

.app-detail-title-steam {
    font-size: 2rem;
    font-weight: 600;
    color: var(--steam-text-primary);
    margin: 0 0 1rem 0;
    font-family: 'Roboto', sans-serif;
}

.app-detail-top-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.app-detail-header-actions {
    flex-shrink: 0;
}

.app-detail-add-remove-btn-steam {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.app-detail-add-remove-btn-steam.add {
    background: var(--steam-green);
    color: white;
}

.app-detail-add-remove-btn-steam.add:hover {
    background: var(--steam-green-bright);
}

.app-detail-add-remove-btn-steam.remove {
    background: var(--steam-red);
    color: white;
}

.app-detail-add-remove-btn-steam.remove:hover {
    background: var(--steam-red-bright);
}

/* Main Content - Two Columns */
.app-detail-main-steam {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.app-detail-left-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.app-detail-right-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Steam-style Boxes */
.app-detail-box-steam {
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    padding: 1.5rem;
}

.app-detail-box-steam h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--steam-text-primary);
    margin: 0 0 1rem 0;
    font-family: 'Roboto', sans-serif;
}

.app-detail-box-steam h2:first-child {
    margin-top: 0;
}

.app-detail-box-steam h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--steam-text-primary);
    margin: 0 0 1rem 0;
    font-family: 'Roboto', sans-serif;
}

.app-detail-events-steam h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Full Product Info (Rich Text) */
.app-detail-full-info-steam {
    color: var(--steam-text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.app-detail-full-info-steam p {
    margin: 0 0 1rem 0;
}

.app-detail-full-info-steam h1,
.app-detail-full-info-steam h2,
.app-detail-full-info-steam h3,
.app-detail-full-info-steam h4 {
    color: var(--steam-text-primary);
    margin: 0.75rem 0 0.75rem 0;
}

.app-detail-full-info-steam h1:first-child,
.app-detail-full-info-steam h2:first-child,
.app-detail-full-info-steam h3:first-child,
.app-detail-full-info-steam h4:first-child {
    margin-top: 0;
}

.app-detail-full-info-steam ul,
.app-detail-full-info-steam ol {
    margin: 0 0 1rem 1.5rem;
}

.app-detail-full-info-steam a {
    color: var(--steam-accent-blue);
    text-decoration: none;
}

.app-detail-full-info-steam a:hover {
    text-decoration: underline;
}

/* Screenshots */
.app-detail-screenshots-steam {
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    padding: 1.5rem;
}

.app-detail-screenshots-carousel {
    position: relative;
    margin-top: 1rem;
}

.app-detail-screenshots-carousel-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid var(--steam-border);
    background: var(--steam-bg-secondary);
}

.app-detail-screenshot-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-detail-screenshot-slide.active {
    opacity: 1;
    z-index: 1;
}

.app-detail-screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.app-detail-screenshot-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
    padding: 0;
}

.app-detail-screenshot-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.app-detail-screenshot-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.app-detail-screenshot-nav-prev {
    left: 10px;
}

.app-detail-screenshot-nav-next {
    right: 10px;
}

.app-detail-screenshots-counter {
    text-align: center;
    margin-top: 0.75rem;
    color: var(--steam-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* News & Events */
.app-detail-events-steam {
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    padding: 1.5rem;
    padding-top: 0.75rem;
}

.app-detail-events-section {
    margin-bottom: 1.5rem;
}

.app-detail-events-section:last-child {
    margin-bottom: 0;
}

.app-detail-events-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--steam-bg-secondary);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    color: var(--steam-text-primary);
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}

.app-detail-events-toggle:hover {
    background: var(--steam-nav-secondary);
}

.app-detail-events-toggle span:first-child {
    flex: 1;
    text-align: left;
}

.events-count {
    background: var(--steam-accent-blue-dark);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
    margin: 0 0.5rem;
}

.events-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.app-detail-events-list {
    margin-top: 1rem;
    display: block;
}

.app-detail-event-steam {
    background: var(--steam-bg-secondary);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.app-detail-event-steam:last-child {
    margin-bottom: 0;
}

.app-detail-event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.app-detail-event-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--steam-text-primary);
    flex: 1;
}

.app-detail-event-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    border: 1px solid #000;
}

.app-detail-event-description-steam {
    color: var(--steam-text-secondary);
    line-height: 1.5;
    margin-bottom: 0;
}

.app-detail-event-description-steam > div {
    margin-bottom: 0 !important;
}

.app-detail-event-description-steam > div:last-child {
    margin-bottom: 0 !important;
}

.app-detail-event-description-steam > div p:last-child {
    margin-bottom: 0 !important;
}

.app-detail-event-description-steam h1,
.app-detail-event-description-steam h2,
.app-detail-event-description-steam h3,
.app-detail-event-description-steam h4,
.app-detail-event-description-steam h5,
.app-detail-event-description-steam h6 {
    color: var(--steam-text-primary);
    margin: 0.5rem 0 0.5rem 0;
    font-weight: 600;
}

.app-detail-event-description-steam h1 { font-size: 1.5rem; }
.app-detail-event-description-steam h2 { font-size: 1.3rem; }
.app-detail-event-description-steam h3 { font-size: 1.1rem; }
.app-detail-event-description-steam h4 { font-size: 1rem; }
.app-detail-event-description-steam h5 { font-size: 0.95rem; }
.app-detail-event-description-steam h6 { font-size: 0.9rem; }

.app-detail-event-description-steam p {
    margin: 0.5rem 0;
}

.app-detail-event-description-steam p:last-child {
    margin-bottom: 0;
}

.app-detail-event-description-steam ul,
.app-detail-event-description-steam ol {
    margin: 0.5rem 0 0.5rem 1.5rem;
    padding-left: 1.5rem;
}

.app-detail-event-description-steam li {
    margin: 0.25rem 0;
}

.app-detail-event-description-steam strong,
.app-detail-event-description-steam b {
    font-weight: 600;
    color: var(--steam-text-primary);
}

.app-detail-event-description-steam em,
.app-detail-event-description-steam i {
    font-style: italic;
}

.app-detail-event-description-steam a {
    color: var(--steam-accent-blue);
    text-decoration: none;
}

.app-detail-event-description-steam a:hover {
    text-decoration: underline;
}

.app-detail-event-description-steam blockquote {
    border-left: 3px solid var(--steam-border);
    padding-left: 1rem;
    margin: 0.5rem 0;
    color: var(--steam-text-muted);
    font-style: italic;
}

.app-detail-event-description-steam code {
    background: var(--steam-bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
}

.app-detail-event-description-steam pre {
    background: var(--steam-bg-secondary);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.app-detail-event-description-steam pre code {
    background: none;
    padding: 0;
}

.app-detail-event-toggle-btn {
    background: var(--steam-accent-blue-dark);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 0.75rem;
    margin-bottom: 0;
    transition: background 0.2s;
}

.app-detail-event-toggle-btn:hover {
    background: var(--steam-accent-blue);
}

.app-detail-event-meta-steam {
    font-size: 0.85rem;
    color: var(--steam-text-muted);
    margin-top: 0.5rem;
}

.app-detail-event-meta-steam a {
    color: var(--steam-accent-blue);
    text-decoration: none;
}

.app-detail-event-meta-steam a:hover {
    text-decoration: underline;
}

/* Trailer/YouTube */
.app-detail-trailer-steam {
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    padding: 1.5rem;
}

.app-detail-youtube-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    margin-top: 1rem;
}

.app-detail-youtube-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

/* Tags Sidebar */
.app-detail-tags-sidebar {
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    padding: 1.5rem;
}

.app-detail-tag-category {
    margin-bottom: 1.5rem;
}

.app-detail-tag-category:last-child {
    margin-bottom: 0;
}

.app-detail-tag-category-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--steam-text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-detail-tag-category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Footer: Social Links & Website */
.app-detail-footer-steam {
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.app-detail-social-steam {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    flex: 1;
}

.app-detail-social-sidebar {
    flex-direction: column;
    gap: 0.75rem;
}

.app-detail-social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--steam-text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    transition: all 0.2s;
}

.app-detail-social-sidebar .app-detail-social-link {
    width: 100%;
    box-sizing: border-box;
}

.app-detail-social-link:hover {
    background: var(--steam-bg-secondary);
    color: var(--steam-text-primary);
    border-color: var(--steam-accent-blue-dark);
}

.social-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.app-detail-website-steam {
    flex-shrink: 0;
}

.app-detail-website-link {
    display: block;
    padding: 0.75rem 1.5rem;
    background: var(--steam-accent-blue-dark);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.app-detail-website-link:hover {
    background: var(--steam-accent-blue);
}

/* Error Page */
.app-detail-error {
    background: var(--steam-card-bg);
    border: 1px solid var(--steam-border);
    border-radius: 4px;
    padding: 3rem;
    text-align: center;
}

.app-detail-error h2 {
    color: var(--steam-text-primary);
    margin-bottom: 1rem;
}

.app-detail-error p {
    color: var(--steam-text-secondary);
    margin-bottom: 2rem;
}

.app-detail-back-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--steam-accent-blue-dark);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
}

.app-detail-back-link:hover {
    background: var(--steam-accent-blue);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .app-detail-page-wrapper {
        padding: 1rem;
    }
    
    .app-detail-header-steam {
        padding: 1.5rem;
    }
    
    .app-detail-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .app-detail-logo-steam {
        width: 104px;
        height: 104px;
    }
    
    .app-detail-title-steam {
        font-size: 1.5rem;
    }
    
    .app-detail-header-actions {
        width: 100%;
    }
    
    .app-detail-add-remove-btn-steam {
        width: 100%;
    }
    
    /* Single column layout on mobile */
    .app-detail-main-steam {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Mobile order: Logo+Title, Status+Add/Remove, Tags, Screenshots, Full Description, Trailer, Leftover Tags, Social Media */
    .app-detail-main-steam {
        display: flex;
        flex-direction: column;
    }
    
    .app-detail-left-column {
        order: 2; /* Full description comes after screenshots */
    }
    
    .app-detail-right-column {
        order: 1; /* Screenshots, events, trailer come first */
    }
    
    .app-detail-footer-steam {
        flex-direction: column;
        align-items: stretch;
    }
    
    .app-detail-social-steam {
        flex-direction: column;
    }
    
    .app-detail-social-link {
        width: 100%;
        justify-content: center;
    }
    
    .app-detail-website-link {
        width: 100%;
        text-align: center;
    }
    
    .breadcrumb-container {
        padding: 0.75rem 1rem;
    }
    
    .breadcrumb-nav {
        font-size: 0.85rem;
    }
}
