:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #ff0050;
    --accent-secondary: #00f2fe;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

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

body, html {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100dvh;
    width: 100vw;
    overflow: hidden; /* Przewijanie tylko na feedzie */
}

/* Layout */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-transition {
    animation: fadeIn 0.3s ease-out forwards;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    width: 100vw;
    max-width: 500px;
    margin: 0 auto;
    background: #111;
    position: relative;
}

/* Scroll snap container (Feed) – TikTok-style vertical snapping */
.feed-container {
    flex: 1;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none; /* Ukrycie paska w Firefox */
    -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
    height: calc(100dvh - 60px - env(safe-area-inset-bottom)); /* room for bottom nav + system bar */
}
.feed-container::-webkit-scrollbar {
    display: none; /* Ukrycie paska w Chrome/Safari */
}

.feed-container.no-snap {
    scroll-snap-type: none;
    scrollbar-width: auto; /* Show scrollbar for long admin pages */
}

.feed-container.no-snap::-webkit-scrollbar {
    display: block;
    width: 6px;
}

.feed-container.no-snap::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

/* Pojedynczy post w feedzie – full viewport height minus nav */
.post-container {
    height: calc(100dvh - 60px - env(safe-area-inset-bottom));
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always; /* each snap = one post */
    position: relative;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Media (video / image) fills the post container */
.post-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-touch-callout: none; /* disable iOS long-press save menu */
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Make sure video elements have no browser controls overlay by default */
video.post-media {
    object-fit: contain;
    background: #000;
}

/* Nakładka informacyjna na video (Glassmorphism) */
.post-overlay {
    position: absolute;
    bottom: 20px;
    left: 10px;
    right: 70px; /* Miejsce na przyciski po prawej */
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    z-index: 10;
}

.plate-number {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--accent-secondary);
    margin-bottom: 2px;
    text-shadow: 0 0 5px rgba(0,242,254,0.5);
}

.post-author {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 5px;
}

.post-desc {
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Panel akcji (Plus/Minus/Komentarze) po prawej */
.action-panel {
    position: absolute;
    right: 10px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    z-index: 10;
}

.action-btn {
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.action-btn:active {
    animation: action-btn-bounce 0.3s ease;
}

.action-btn.active {
    filter: drop-shadow(0 0 6px currentColor);
}

.action-btn.upvote {
    color: #fff;
}

.action-btn.upvote.active {
    color: #4CAF50;
    filter: drop-shadow(0 0 8px rgba(76, 175, 80, 0.6));
}

.action-btn.downvote {
    color: #fff;
}

.action-btn.downvote.active {
    color: var(--accent-color);
    filter: drop-shadow(0 0 8px rgba(255, 0, 80, 0.6));
}

.action-value {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Dolne menu nawigacyjne */
.bottom-nav {
    height: calc(60px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    z-index: 100;
    flex-shrink: 0; /* prevent nav from shrinking */
}

.nav-item {
    color: #aaa;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transition: color 0.3s;
}

.nav-item.active {
    color: var(--text-color);
}

.nav-add-btn {
    background: linear-gradient(45deg, var(--accent-secondary), var(--accent-color));
    color: white;
    width: 44px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    font-weight: bold;
    text-decoration: none;
    line-height: 1;
}

/* Formularze (Add Post) */
.form-container {
    padding: 20px;
    padding-bottom: 80px;
    overflow-y: auto;
    height: 100%;
    animation: fadeIn 0.3s ease-out forwards;
}

.form-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: -webkit-linear-gradient(45deg, var(--accent-secondary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #aaa;
}

.form-control {
    width: 100%;
    background: #222;
    border: 1px solid #333;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-secondary);
}

.btn-submit {
    width: 100%;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

#blazor-error-ui {
    display: none !important;
}

/* Comments Panel */
.comments-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    display: flex;
    flex-direction: column;
    z-index: 50;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.comments-panel.open {
    transform: translateY(0);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    font-weight: bold;
}

.close-comments {
    cursor: pointer;
    font-size: 1.2rem;
    color: #aaa;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-item {
    display: flex;
    flex-direction: column;
}

.comment-author {
    font-weight: bold;
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 2px;
}

.comment-content {
    font-size: 0.95rem;
}

.comment-date {
    font-size: 0.7rem;
    color: #666;
    margin-top: 4px;
}

/* Comment Vote Controls */
.comment-vote {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.comment-vote-btn {
    background: transparent;
    border: none;
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.comment-vote-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.comment-vote-btn:active {
    transform: scale(0.9);
}

.comment-vote-btn.active {
    color: var(--accent-secondary);
    background: rgba(0, 242, 254, 0.1);
}

.comment-vote-btn.comment-upvote.active {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.15);
}

.comment-vote-btn.comment-downvote.active {
    color: var(--accent-color);
    background: rgba(255, 0, 80, 0.15);
}

.comment-score {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ccc;
    min-width: 20px;
    text-align: center;
}

.comment-input-area {
    padding: 15px;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
}

.comment-input {
    flex: 1;
    background: #222;
    border: 1px solid #333;
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    outline: none;
}

.comment-input:focus {
    border-color: var(--accent-secondary);
}

.btn-comment {
    background: transparent;
    color: var(--accent-secondary);
    border: none;
    font-weight: bold;
    cursor: pointer;
}

/* Skeleton Loaders */
.skeleton-post {
    position: relative;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    overflow: hidden;
}

.skeleton-pulse {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-overlay {
    position: absolute;
    bottom: 20px;
    left: 10px;
    right: 70px;
    padding: 15px;
    z-index: 2;
}

.skeleton-line {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.skeleton-actions {
    position: absolute;
    right: 10px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 2;
}

.skeleton-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Spinner */
.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--accent-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 400px;
    width: 90%;
}

.toast-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    animation: toastSlideIn 0.4s ease-out forwards;
    pointer-events: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast-item.toast-exit {
    animation: toastSlideOut 0.4s ease-in forwards;
}

.toast-success {
    background: rgba(76, 175, 80, 0.85);
    border: 1px solid rgba(76, 175, 80, 0.5);
}

.toast-error {
    background: rgba(255, 0, 80, 0.85);
    border: 1px solid rgba(255, 0, 80, 0.5);
}

.toast-info {
    background: rgba(0, 242, 254, 0.2);
    border: 1px solid rgba(0, 242, 254, 0.4);
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
}

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

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

/* Active vote pulse */
.active-vote {
    animation: votePulse 0.3s ease-out;
}

@keyframes votePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Action button bounce animation for tap feedback */
@keyframes action-btn-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Bottom nav active state */
.bottom-nav .nav-item.active,
.bottom-nav a.active {
    color: var(--accent-secondary) !important;
}

.bottom-nav .nav-add-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 0, 80, 0.4);
}

/* Admin/My-plates containers - fade in */
.admin-container,
.my-plates-container,
.profile-container {
    animation: fadeIn 0.3s ease-out forwards;
}


/* ===== Video Controls Overlay Styles ===== */

/* --- Progress Bar --- */
.video-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 20;
    cursor: pointer;
    transition: height 0.15s ease;
}

.video-progress-container:hover,
.video-progress-container:active {
    height: 5px;
}

.video-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-color);
    border-radius: 0 2px 2px 0;
    position: relative;
    transition: width 0.1s linear;
}

/* Draggable thumb — appears on hover/touch */
.video-progress-container:hover .video-progress-bar::after,
.video-progress-container:active .video-progress-bar::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(255, 0, 80, 0.6);
}

/* --- Mute Button --- */
.video-mute-btn {
    position: absolute;
    top: 16px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 20;
    transition: background 0.2s ease;
}

.video-mute-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.video-mute-btn:active {
    transform: scale(0.9);
}

/* --- Pause Indicator --- */
.video-pause-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 15;
}

.video-pause-indicator.visible {
    opacity: 1;
}

/* --- Speed Indicator --- */
.video-speed-indicator {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 15;
}

.video-speed-indicator.visible {
    opacity: 1;
}

/* --- Like Animation --- */
.video-like-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 25;
    overflow: hidden;
}

.video-like-heart {
    position: absolute;
    font-size: 2.5rem;
    pointer-events: none;
    animation: likeHeartBurst 0.8s ease-out forwards;
}

@keyframes likeHeartBurst {
    0% {
        opacity: 1;
        transform: scale(0) translateY(0);
    }
    30% {
        opacity: 1;
        transform: scale(1.2) translateY(-10px);
    }
    60% {
        opacity: 1;
        transform: scale(1) translateY(-20px);
    }
    100% {
        opacity: 0;
        transform: scale(1) translateY(-40px);
    }
}

/* ===== Auth pages (login / register) ===== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    min-height: 100%;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out forwards;
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 4px;
    background: -webkit-linear-gradient(45deg, var(--accent-secondary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    color: #888;
    font-size: 0.9rem;
    margin: 0 0 24px;
}

.auth-error {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 0, 80, 0.12);
    border: 1px solid var(--accent-color);
    color: #ff5e8f;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    font-weight: 600;
    animation: fadeIn 0.2s ease-out forwards;
}

.auth-error-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.field-error {
    display: block;
    color: #ff5e8f;
    font-size: 0.8rem;
    margin-top: 6px;
}

.form-control.invalid {
    border-color: var(--accent-color);
}

.form-control.modified.valid {
    border-color: rgba(0, 242, 254, 0.5);
}

.auth-switch {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

.auth-switch a {
    color: var(--accent-secondary);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Button with inline spinner */
.btn-with-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.2s, transform 0.1s;
}

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

.btn-submit:not(:disabled):active {
    transform: scale(0.98);
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

/* Feed empty / error states */
.feed-state {
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    flex-direction: column;
    gap: 14px;
    text-align: center;
    padding: 40px 20px;
}

.feed-state-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.feed-state h2 {
    margin: 0;
    font-size: 1.4rem;
}

.feed-state p {
    margin: 0;
    color: #888;
}

/* ===== Add Post page ===== */
.form-subtitle {
    color: #888;
    font-size: 0.9rem;
    margin: -12px 0 24px;
}

.plate-input {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 32px 20px;
    border: 2px dashed #3a3a3a;
    border-radius: 12px;
    background: #161616;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-align: center;
}

.upload-dropzone:hover {
    border-color: var(--accent-secondary);
    background: #1a1a1a;
}

.upload-dropzone.has-file {
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-style: solid;
    text-align: left;
}

.link-remove {
    background: transparent;
    border: none;
    color: #ff5e8f;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 2px 0;
}

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

.upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.upload-icon {
    font-size: 1.8rem;
    color: var(--accent-secondary);
}

.upload-text {
    font-weight: 600;
    color: #ddd;
}

.upload-hint {
    font-size: 0.8rem;
    color: #777;
}

.file-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    animation: fadeIn 0.2s ease-out forwards;
}

.file-card-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.file-card-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.file-card-name {
    font-weight: 600;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-card-size {
    font-size: 0.8rem;
    color: #888;
}

.file-card-remove {
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.1rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.file-card-remove:hover {
    background: rgba(255, 0, 80, 0.15);
    color: var(--accent-color);
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 10px;
    margin-bottom: 14px;
    color: #cfe;
    font-size: 0.9rem;
}

/* ===== Shared UI polish ===== */

/* Score pill badge */
.score-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.score-pill.positive {
    background: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
}

.score-pill.negative {
    background: rgba(255, 0, 80, 0.15);
    color: #ff3b76;
}

.score-pill.neutral {
    background: rgba(255, 255, 255, 0.08);
    color: #bbb;
}

/* Verified check badge */
.verified-badge {
    color: #4CAF50;
    margin-left: 6px;
}

/* Generic interactive card */
.ui-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.ui-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-secondary);
    background: #202020;
}

.ui-card:active {
    transform: translateY(0);
}

/* Staggered fade-in for lists */
.stagger-item {
    opacity: 0;
    animation: staggerIn 0.4s ease-out forwards;
}

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

/* Page heading */
.page-heading {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: -webkit-linear-gradient(45deg, var(--accent-secondary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Empty / error states (compact, for sub-pages) */
.state-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    color: #888;
    padding: 50px 20px;
}

.state-block .state-icon {
    font-size: 2.6rem;
    opacity: 0.8;
}

.state-block h3 {
    margin: 0;
    color: #ddd;
    font-size: 1.1rem;
}

.state-block p {
    margin: 0;
    font-size: 0.9rem;
}

/* List skeleton row */
.skeleton-row {
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(90deg, #1a1a1a 0%, #262626 50%, #1a1a1a 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    margin-bottom: 10px;
}

/* ===== Rankings podium ===== */
.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.podium-place {
    flex: 1;
    max-width: 120px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s ease;
    animation: staggerIn 0.5s ease-out forwards;
}

.podium-place:hover {
    transform: translateY(-4px);
}

.podium-place .podium-medal {
    font-size: 2rem;
    line-height: 1;
}

.podium-place .podium-plate {
    font-weight: 800;
    font-size: 1rem;
    margin: 8px 0 4px;
    letter-spacing: 1px;
    word-break: break-all;
}

.podium-bar {
    border-radius: 8px 8px 0 0;
    margin-top: 10px;
    background: linear-gradient(180deg, var(--accent-secondary), rgba(0, 242, 254, 0.2));
}

.podium-place.gold { border-color: #ffd24a; box-shadow: 0 0 20px rgba(255, 210, 74, 0.2); }
.podium-place.gold .podium-bar { height: 70px; background: linear-gradient(180deg, #ffd24a, rgba(255, 210, 74, 0.2)); }
.podium-place.silver .podium-bar { height: 52px; background: linear-gradient(180deg, #cfd8dc, rgba(207, 216, 220, 0.2)); }
.podium-place.bronze .podium-bar { height: 40px; background: linear-gradient(180deg, #d9954a, rgba(217, 149, 74, 0.2)); }

.podium-place.negative.gold .podium-bar,
.podium-place.negative .podium-bar { background: linear-gradient(180deg, var(--accent-color), rgba(255, 0, 80, 0.2)); }

.rank-number {
    font-size: 1.1rem;
    font-weight: 800;
    width: 32px;
    text-align: center;
    color: #777;
    flex-shrink: 0;
}

/* ===== Search ===== */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.search-result-count {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

/* Tabs (rankings) */
.tab-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    background: #1a1a1a;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tab-btn.active-top {
    background: var(--accent-secondary);
    color: #000;
    border-color: var(--accent-secondary);
}

.tab-btn.active-bottom {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* ===== Plate profile header ===== */
.plate-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding: 0 20px;
}

.plate-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-color));
    box-shadow: 0 6px 24px rgba(0, 242, 254, 0.25);
    letter-spacing: 1px;
}

.plate-profile-name {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 2px;
}

.plate-profile-stats {
    display: flex;
    align-items: center;
    gap: 14px;
}

.plate-stat-films {
    color: #888;
    font-size: 0.9rem;
    font-weight: 600;
}
