/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color var(--transition), color var(--transition);
}

img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
ul { list-style: none; }

/* ===== CSS VARIABLES ===== */
:root {
    --cream: #FFEFD5;
    --caramel: #F5DEB3;
    --chocolate: #D2691E;
    --dark-chocolate: #8B4513;
    --accent: #FF6B6B;
    --accent-hover: #ff5252;
    --success: #4CAF50;
    --warning: #FF9800;
    --error: #f44336;
    --info: #2196F3;

    --bg-primary: #FFEFD5;
    --bg-secondary: #F5DEB3;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --text-primary: #2d1810;
    --text-secondary: #5a3a28;
    --text-muted: #8b7355;
    --border: rgba(210, 105, 30, 0.2);
    --shadow: 0 4px 15px rgba(139, 69, 19, 0.15);
    --shadow-hover: 0 8px 25px rgba(139, 69, 19, 0.25);

    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --transition: 0.3s ease;
    --nav-height: 70px;
}

[data-theme="dark"] {
    --bg-primary: #1a0f0a;
    --bg-secondary: #2d1810;
    --bg-card: #3a2218;
    --bg-input: #2d1810;
    --text-primary: #FFEFD5;
    --text-secondary: #D2B48C;
    --text-muted: #a08060;
    --border: rgba(90, 58, 40, 0.4);
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
p { margin-bottom: var(--space-md); }

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-lg);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: var(--space-sm) auto 0;
    border-radius: 2px;
}

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
    background: var(--chocolate);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: var(--dark-chocolate); }

/* ===== NAVIGATION ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-card);
    box-shadow: var(--shadow);
    transition: background var(--transition);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    height: var(--nav-height);
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--chocolate) !important;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-links a {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--bg-secondary);
    color: var(--accent);
}

.dark-mode-toggle {
    background: none;
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.dark-mode-toggle:hover {
    border-color: var(--accent);
    transform: rotate(20deg);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 80%, rgba(245, 222, 179, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(210, 105, 30, 0.2) 0%, transparent 50%),
        var(--bg-primary);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: var(--space-xl) var(--space-md);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--chocolate), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.pudding-hero {
    width: 150px;
    height: 120px;
    margin: 0 auto var(--space-lg);
    position: relative;
    animation: wobble 3s ease-in-out infinite;
}

.pudding-hero .pudding-top {
    width: 100%;
    height: 40px;
    background: linear-gradient(180deg, #D2691E, #A0522D);
    border-radius: 50% 50% 0 0;
    position: relative;
}

.pudding-hero .pudding-top::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #ff0044, #cc0033);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 0, 68, 0.5);
}

.pudding-hero .pudding-body {
    width: 100%;
    height: 60px;
    background: linear-gradient(180deg, #FFEFD5, #F5DEB3);
    border-radius: 0 0 30% 30%;
    position: relative;
    overflow: hidden;
}

.pudding-hero .pudding-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: -10%;
    width: 120%;
    height: 20px;
    background: linear-gradient(180deg, rgba(210, 105, 30, 0.6), transparent);
    border-radius: 0 0 50% 50%;
}

.pudding-hero .pudding-plate {
    width: 130%;
    height: 15px;
    background: linear-gradient(180deg, #ddd, #bbb);
    border-radius: 0 0 50% 50%;
    margin: 0 auto;
    position: relative;
    left: -15%;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    padding: var(--space-lg);
    min-height: 120px;
    display: flex;
    align-items: flex-end;
    position: relative;
}

.card-header h3 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    margin: 0;
    position: relative;
    z-index: 1;
}

.card-body {
    padding: var(--space-md) var(--space-lg);
}

.card-footer {
    padding: var(--space-sm) var(--space-lg) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* Výprdkoměr */
.vyprdkomer {
    width: 100%;
    height: 10px;
    background: var(--bg-secondary);
    border-radius: 5px;
    overflow: hidden;
    margin: var(--space-sm) 0;
}

.vyprdkomer-bar {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, #4CAF50, #FF9800, #f44336);
    transition: width 0.5s ease;
}

/* Hvězdičky */
.stars { display: inline-flex; gap: 2px; }
.star { font-size: 1.2rem; color: var(--text-muted); }
.star.filled { color: #FFD700; }
.star.half {
    color: #FFD700;
    position: relative;
    overflow: hidden;
}

/* Vyprdnout tlačítko */
.btn-vyprdnout {
    background: linear-gradient(135deg, var(--accent), #ff8a80);
    color: #fff;
    border: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.btn-vyprdnout:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-vyprdnout:active {
    transform: scale(0.95);
}

.vyprdnuti-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--chocolate), var(--dark-chocolate));
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.4);
    color: #fff;
}

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

.btn-secondary:hover {
    border-color: var(--chocolate);
    color: var(--chocolate);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
}

.btn-accent:hover { color: #fff; }

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.85rem;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: border-color var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--chocolate);
    box-shadow: 0 0 0 3px rgba(210, 105, 30, 0.15);
}

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

.form-error {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: var(--space-xs);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238B4513' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.star-input {
    display: flex;
    gap: 4px;
    font-size: 1.5rem;
    cursor: pointer;
    direction: rtl;
    justify-content: flex-end;
}

.star-input input { display: none; }
.star-input label {
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition);
}

.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label {
    color: #FFD700;
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: var(--space-lg);
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-sm);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.page-link:hover {
    background: var(--chocolate);
    color: #fff;
}

.page-link.active {
    background: var(--chocolate);
    color: #fff;
    pointer-events: none;
}

/* ===== TOAST NOTIFICATIONS ===== */
#toast-container {
    position: fixed;
    top: calc(var(--nav-height) + var(--space-md));
    right: var(--space-md);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 500;
    box-shadow: var(--shadow);
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    max-width: 350px;
    word-break: break-word;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--error); }
.toast-warning { background: var(--warning); }
.toast-info { background: var(--info); }

/* ===== PODIUM ===== */
.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-xl) 0;
    min-height: 350px;
}

.podium-place {
    text-align: center;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: var(--space-md);
    min-width: 140px;
    transition: all var(--transition);
    animation: growUp 0.8s ease forwards;
}

.podium-1 {
    background: linear-gradient(180deg, #FFD700, #FFA500);
    height: 200px;
    order: 2;
}

.podium-2 {
    background: linear-gradient(180deg, #C0C0C0, #A0A0A0);
    height: 160px;
    order: 1;
}

.podium-3 {
    background: linear-gradient(180deg, #CD7F32, #A0522D);
    height: 130px;
    order: 3;
}

.podium-place .rank {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.podium-place .name {
    color: #fff;
    font-weight: 600;
    margin: var(--space-xs) 0;
    font-size: 0.9rem;
}

.podium-place .score {
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
}

/* ===== BAR CHART ===== */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: var(--space-sm);
    height: 200px;
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.bar-chart .bar {
    flex: 1;
    background: linear-gradient(180deg, var(--chocolate), var(--dark-chocolate));
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: var(--space-sm);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 20px;
    transition: height 0.8s ease;
}

.bar-chart .bar-label {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* ===== GALLERY ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-md);
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
    transition: all var(--transition);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-hover);
}

.gallery-item .meme-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    text-align: center;
}

.gallery-item .meme-text {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    line-height: 1.4;
}

.gallery-item .meme-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transition: opacity var(--transition);
}

.gallery-item:hover .meme-overlay {
    opacity: 1;
}

.meme-overlay .like-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    transition: transform var(--transition);
}

.meme-overlay .like-btn:hover {
    transform: scale(1.2);
}

.meme-overlay .like-btn.liked {
    color: var(--accent);
}

.meme-overlay .category-tag {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
    color: #fff;
    font-size: 0.75rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 80vw;
    max-height: 80vh;
    border-radius: var(--radius);
    overflow: hidden;
    min-width: 300px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    position: relative;
}

.lightbox-text {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== TICKER ===== */
.ticker {
    overflow: hidden;
    background: var(--bg-secondary);
    padding: var(--space-sm) 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.ticker-content {
    display: flex;
    gap: var(--space-xl);
    animation: scrollLeft 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    flex-shrink: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ticker-item strong {
    color: var(--chocolate);
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-novacek { background: #e8f5e9; color: #2e7d32; }
.badge-metr { background: #e3f2fd; color: #1565c0; }
.badge-snajpr { background: #fff3e0; color: #e65100; }
.badge-mistr { background: #fce4ec; color: #c62828; }
.badge-raketak { background: #f3e5f5; color: #6a1b9a; }
.badge-kral { background: #fff8e1; color: #f57f17; }
.badge-legenda { background: #fbe9e7; color: #bf360c; }

[data-theme="dark"] .badge-novacek { background: #1b5e20; color: #a5d6a7; }
[data-theme="dark"] .badge-metr { background: #0d47a1; color: #90caf9; }
[data-theme="dark"] .badge-snajpr { background: #bf360c; color: #ffcc80; }
[data-theme="dark"] .badge-mistr { background: #b71c1c; color: #ef9a9a; }
[data-theme="dark"] .badge-raketak { background: #4a148c; color: #ce93d8; }
[data-theme="dark"] .badge-kral { background: #f57f17; color: #fff9c4; }
[data-theme="dark"] .badge-legenda { background: #bf360c; color: #ffab91; }

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
    text-align: center;
}

.stat-card {
    background: var(--bg-card);
    padding: var(--space-lg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--chocolate);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* ===== PUDING DNE ===== */
.puding-dne {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
}

.puding-dne .puding-dne-header {
    padding: var(--space-lg);
    text-align: center;
}

.puding-dne .puding-dne-body {
    padding: 0 var(--space-lg) var(--space-lg);
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    align-items: center;
}

.filter-bar .filter-btn {
    padding: var(--space-xs) var(--space-md);
    border: 2px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-weight: 500;
}

.filter-bar .filter-btn:hover,
.filter-bar .filter-btn.active {
    border-color: var(--chocolate);
    background: var(--chocolate);
    color: #fff;
}

.sort-select {
    margin-left: auto;
}

/* ===== COOKIE CONSENT ===== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: var(--space-md) var(--space-lg);
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    text-align: center;
    animation: slideUp 0.5s ease;
}

.cookie-consent p {
    margin: 0;
    color: var(--text-secondary);
}

/* ===== FLASH MESSAGES ===== */
.flash {
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    font-weight: 500;
}

.flash-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.flash-error { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
[data-theme="dark"] .flash-success { background: #1b5e20; color: #a5d6a7; border-color: #2e7d32; }
[data-theme="dark"] .flash-error { background: #b71c1c; color: #ef9a9a; border-color: #c62828; }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--bg-secondary);
    padding: var(--space-xl) 0 var(--space-lg);
    margin-top: var(--space-xl);
    border-top: 3px solid var(--chocolate);
}

.footer-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
    font-weight: 600;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.site-footer .copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== 404 PAGE ===== */
.page-404 {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sad-pudding {
    width: 120px;
    height: 100px;
    margin: 0 auto var(--space-lg);
    position: relative;
    animation: sadWobble 2s ease-in-out infinite;
}

.sad-pudding .pudding-body-sad {
    width: 100%;
    height: 70px;
    background: linear-gradient(180deg, #FFEFD5, #e0c9a0);
    border-radius: 10px 10px 30% 30%;
}

.sad-pudding .sad-face {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    text-align: center;
}

.sad-pudding .eyes {
    font-size: 1.5rem;
    letter-spacing: 15px;
    margin-left: 8px;
}

.sad-pudding .mouth {
    font-size: 1.8rem;
    margin-top: -5px;
}

.page-404 h1 {
    font-size: 5rem;
    color: var(--chocolate);
    line-height: 1;
    margin-bottom: var(--space-sm);
}

/* ===== STORY CARD ===== */
.story-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    border-left: 4px solid var(--chocolate);
}

.story-card .story-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.story-card .story-meta {
    margin-top: var(--space-md);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.story-history {
    max-height: 600px;
    overflow-y: auto;
}

/* ===== TABLE ===== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

.data-table th,
.data-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.data-table th a {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.data-table th a:hover { color: var(--chocolate); }

.data-table tr:hover {
    background: var(--bg-secondary);
}

.data-table .rank-cell {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--chocolate);
}

/* ===== STATS ROW ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.stats-row .stat-item {
    background: var(--bg-card);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    text-align: center;
}

.stats-row .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--chocolate);
}

.stats-row .stat-name {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== NEWSLETTER ===== */
.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form .form-control {
    flex: 1;
}

/* ===== COLLAPSIBLE ===== */
.collapsible-toggle {
    width: 100%;
    text-align: left;
    padding: var(--space-md);
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition);
}

.collapsible-toggle:hover {
    border-color: var(--chocolate);
}

.collapsible-toggle .arrow {
    transition: transform var(--transition);
}

.collapsible-toggle.active .arrow {
    transform: rotate(180deg);
}

.collapsible-content {
    display: none;
    padding: var(--space-md);
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.collapsible-content.active {
    display: block;
}

/* ===== REVIEW LIST ===== */
.review-list {
    max-height: 300px;
    overflow-y: auto;
}

.review-item {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
}

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

.review-item .review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.review-item .review-author {
    font-weight: 600;
    color: var(--text-primary);
}

.review-item .review-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.review-item .review-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== LOADING SPINNER ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--chocolate);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: var(--space-lg) auto;
}

/* ===== CONFETTI CANVAS ===== */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4000;
}

/* ===== ANIMATIONS ===== */
@keyframes wobble {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-3deg) scale(1.02); }
    50% { transform: rotate(0deg) scale(0.98); }
    75% { transform: rotate(3deg) scale(1.02); }
}

@keyframes sadWobble {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(-2deg) translateY(3px); }
    75% { transform: rotate(2deg) translateY(3px); }
}

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

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

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

@keyframes scrollLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes growUp {
    from { height: 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.page-shake {
    animation: shake 0.5s ease;
}

/* ===== TOP PUDINGY LIST ===== */
.top-list {
    max-width: 600px;
    margin: 0 auto;
}

.top-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.top-item:hover {
    transform: translateX(5px);
}

.top-item .top-rank {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--chocolate);
    min-width: 40px;
    text-align: center;
}

.top-item .top-info { flex: 1; }
.top-item .top-name { font-weight: 600; }
.top-item .top-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.top-item .top-sila {
    width: 50px;
    text-align: center;
}

/* ===== TWO COLUMN LAYOUT ===== */
.two-col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
    align-items: start;
}

/* ===== RESPONSIVE: 1024px ===== */
@media (max-width: 1024px) {
    .hero h1 { font-size: 2.8rem; }

    .two-col {
        grid-template-columns: 1fr;
    }

    .podium-place { min-width: 120px; }
}

/* ===== RESPONSIVE: 768px ===== */
@media (max-width: 768px) {
    .hamburger { display: flex; }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-sm);
        overflow-y: auto;
    }

    .nav-links.active { display: flex; }

    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.1rem; }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }

    .grid-3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
    .grid-2 { grid-template-columns: 1fr; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    .podium { flex-direction: column; align-items: center; min-height: auto; }
    .podium-place { width: 100%; max-width: 300px; height: auto !important; padding: var(--space-md); border-radius: var(--radius); }
    .podium-1 { order: 1; border-left: 4px solid #FFD700; }
    .podium-2 { order: 2; border-left: 4px solid #C0C0C0; }
    .podium-3 { order: 3; border-left: 4px solid #CD7F32; }

    .newsletter-form { flex-direction: column; }

    .filter-bar { justify-content: center; }
    .sort-select { margin-left: 0; width: 100%; }
}

/* ===== RESPONSIVE: 480px ===== */
@media (max-width: 480px) {
    :root { font-size: 14px; }

    .hero { min-height: 60vh; }
    .hero h1 { font-size: 1.8rem; }

    .container { padding: 0 var(--space-sm); }

    .card-body { padding: var(--space-sm) var(--space-md); }
    .card-footer { padding: var(--space-sm) var(--space-md) var(--space-md); }

    .footer-stats { flex-direction: column; align-items: center; }

    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--chocolate);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--dark-chocolate);
    transform: translateY(-3px);
}

/* ===== ACCESSIBILITY ===== */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
