/* Huisstijl & Design System */
:root {
    --bg-color: #070a13;
    --card-bg: rgba(17, 24, 39, 0.75);
    --card-border: rgba(255, 255, 255, 0.08);
    
    /* Statiegeld Nederland Brand Colors */
    --statie-blue: #004F9F;
    --statie-blue-glow: rgba(0, 79, 159, 0.4);
    --statie-orange: #E84E1B;
    --statie-orange-glow: rgba(232, 78, 27, 0.4);
    --statie-green: #00B55B;
    --statie-green-glow: rgba(0, 181, 91, 0.4);
    
    /* Donnie Gimmick Colors */
    --donnie-yellow: #FFDF00;
    --donnie-yellow-glow: rgba(255, 223, 0, 0.5);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --font-display: 'Rubik Mono One', sans-serif;
    --font-sans: 'Outfit', sans-serif;
    
    --shadow-neon-yellow: 0 0 20px var(--donnie-yellow-glow);
    --shadow-neon-green: 0 0 20px var(--statie-green-glow);
    --shadow-neon-blue: 0 0 20px var(--statie-blue-glow);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Glowing Orbs */
.glow-bg-1 {
    position: absolute;
    width: 600px;
    height: 600px;
    top: -150px;
    left: -150px;
    background: radial-gradient(circle, var(--statie-blue-glow) 0%, rgba(7, 10, 19, 0) 70%);
    z-index: -2;
    pointer-events: none;
}

.glow-bg-2 {
    position: absolute;
    width: 600px;
    height: 600px;
    bottom: -150px;
    right: -150px;
    background: radial-gradient(circle, var(--statie-green-glow) 0%, rgba(7, 10, 19, 0) 70%);
    z-index: -2;
    pointer-events: none;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    pointer-events: none;
}

/* Container */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    position: relative;
    z-index: 10;
}

.logo-container {
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-container:hover {
    transform: scale(1.08) rotate(5deg);
}

.main-logo {
    height: 65px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

.donnie-avatar-container {
    position: relative;
    cursor: pointer;
    width: 90px;
    height: 90px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.donnie-avatar-container:hover {
    transform: scale(1.1) rotate(-5deg);
}

.donnie-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

/* Speech Bubble */
.speech-bubble {
    position: absolute;
    right: 110px;
    top: 15px;
    background: var(--donnie-yellow);
    color: #000;
    padding: 12px 18px;
    border-radius: 18px 18px 0px 18px;
    font-weight: 800;
    width: max-content;
    max-width: 250px;
    box-shadow: 0 4px 15px rgba(255, 223, 0, 0.3);
    font-size: 0.95rem;
    transform-origin: bottom right;
    animation: bubblePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid #000;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    right: -10px;
    bottom: -2px;
    width: 0;
    height: 0;
    border-left: 12px solid var(--donnie-yellow);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    transform: rotate(30deg);
}

@keyframes bubblePop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Ticker Slogan */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: linear-gradient(90deg, var(--statie-blue) 0%, #0c4a6e 50%, var(--statie-green) 100%);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.ticker {
    display: inline-flex;
    white-space: nowrap;
    animation: tickerAnim 25s linear infinite;
    gap: 40px;
    padding-left: 100%;
}

.ticker-item {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes tickerAnim {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Main Display Counter Card */
.counter-section {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.counter-card {
    width: 100%;
    max-width: 550px;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 28px;
    padding: 35px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.counter-card:hover {
    transform: translateY(-5px);
    border-color: var(--donnie-yellow);
    box-shadow: 0 15px 50px rgba(255, 223, 0, 0.15), 0 0 25px rgba(255, 223, 0, 0.1);
}

.can-glow-ring {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 180deg at 50% 50%, var(--statie-blue) 0deg, var(--donnie-yellow) 120deg, var(--statie-green) 240deg, var(--statie-blue) 360deg);
    animation: rotateGlow 8s linear infinite;
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
}

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

.card-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card-label {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    border-bottom: 2px solid var(--donnie-yellow);
    padding-bottom: 4px;
}

.main-count {
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 1;
    margin: 15px 0 5px 0;
    background: linear-gradient(135deg, #fff 30%, var(--donnie-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(255, 223, 0, 0.2);
    letter-spacing: -2px;
    transition: transform 0.1s ease;
}

.counter-card:active .main-count {
    transform: scale(0.95);
}

.card-unit {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--donnie-yellow);
    margin-bottom: 20px;
}

.money-value {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--statie-green);
    text-shadow: 0 0 15px rgba(0, 181, 91, 0.3);
}

/* Sparkles animation */
.sparkles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    opacity: 0;
    font-size: 1.5rem;
    animation: floatSparkle 3s ease-in-out infinite;
}

.sparkle:nth-child(1) { top: 10%; left: 10%; animation-delay: 0.2s; }
.sparkle:nth-child(2) { top: 20%; right: 12%; animation-delay: 1.2s; }
.sparkle:nth-child(3) { bottom: 15%; left: 15%; animation-delay: 2.2s; }

@keyframes floatSparkle {
    0% { transform: translateY(10px) scale(0.5); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: translateY(-30px) scale(1.2); opacity: 0; }
}

/* Action Buttons */
.actions-section {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.btn {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 1.05rem;
    padding: 16px 32px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-icon {
    font-size: 1.3rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--donnie-yellow) 0%, #EAB308 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 223, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 223, 0, 0.45);
}

.btn-glow {
    animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 223, 0, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(255, 223, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 223, 0, 0); }
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(1px);
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 15px;
}

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

.grid-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 24px;
    padding: 30px;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.section-title {
    font-family: var(--font-sans);
    font-weight: 900;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
}

.title-icon {
    font-size: 1.8rem;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

/* Leaderboard Podium styling */
.leaderboard-podium {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 30px;
    height: 180px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.podium-placeholder {
    grid-column: 1 / span 3;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 40px 0;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.podium-username {
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 6px;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podium-cans {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--donnie-yellow);
    margin-bottom: 8px;
}

.podium-block {
    width: 100%;
    border-radius: 12px 12px 4px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Second place styling */
.podium-2nd .podium-block {
    height: 70px;
    background: linear-gradient(180deg, #94a3b8 0%, #475569 100%);
    color: #0f172a;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 15px rgba(148, 163, 184, 0.2);
}

/* First place styling */
.podium-1st .podium-block {
    height: 100px;
    background: linear-gradient(180deg, var(--donnie-yellow) 0%, #ca8a04 100%);
    color: #000;
    border: 1.5px solid var(--donnie-yellow);
    box-shadow: 0 6px 20px rgba(255, 223, 0, 0.3);
}

/* Third place styling */
.podium-3rd .podium-block {
    height: 50px;
    background: linear-gradient(180deg, #b45309 0%, #78350f 100%);
    color: #fef3c7;
    border: 1px solid #d97706;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.2);
}

.podium-1st {
    z-index: 2;
}

/* Leaderboard List styling */
.leaderboard-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 18px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.row-rank {
    font-family: var(--font-display);
    font-size: 0.9rem;
    width: 35px;
    color: var(--text-muted);
}

.row-name {
    flex-grow: 1;
    font-weight: 700;
}

.row-amount {
    font-weight: 800;
    color: var(--text-primary);
}

.row-value {
    margin-left: 15px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--statie-green);
    background: rgba(0, 181, 91, 0.1);
    padding: 4px 10px;
    border-radius: 8px;
}

/* Recent Activity styling */
.recent-list-container {
    max-height: 380px;
    overflow-y: auto;
    padding-right: 5px;
}

.recent-list-container::-webkit-scrollbar {
    width: 6px;
}
.recent-list-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}
.recent-list-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}
.recent-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

.recent-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border-left: 4px solid var(--statie-blue);
    padding: 14px 18px;
    border-radius: 0 14px 14px 0;
    transition: transform 0.2s ease, background 0.2s ease;
}

.recent-item:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.05);
}

.recent-item.highlight-new {
    animation: newItemFlash 1.5s ease-out;
}

@keyframes newItemFlash {
    0% { background: rgba(0, 181, 91, 0.25); border-left-color: var(--statie-green); }
    100% { background: rgba(255, 255, 255, 0.02); border-left-color: var(--statie-blue); }
}

.recent-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.recent-user {
    font-weight: 700;
    font-size: 1.05rem;
}

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

.recent-amount-badge {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.badge-cans {
    font-weight: 800;
    color: var(--donnie-yellow);
}

.badge-euros {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--statie-green);
}

.recent-placeholder {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 50px 0;
}

/* Footer Styling */
.app-footer {
    margin-top: 30px;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.disclaimer {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: #0f172a;
    border: 2px solid var(--card-border);
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.modal-overlay.open .modal-box {
    transform: scale(1);
    border-color: var(--statie-blue);
    box-shadow: 0 0 30px rgba(0, 79, 159, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 15px;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 800;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.form-group input {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--statie-blue);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(0, 79, 159, 0.2);
}

.amount-input-wrapper {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 15px;
}

.amount-calc {
    font-weight: 800;
    color: var(--statie-green);
    font-size: 1.05rem;
}

.form-tip {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.form-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: none;
}

.form-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: none;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
}

.modal-actions .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
}

/* Animations and Easter Eggs */
.upside-down {
    transform: rotate(180deg) scale(1.08) !important;
}

/* Party Mode flashing */
.party-mode {
    animation: partyColors 1s linear infinite !important;
}

@keyframes partyColors {
    0% { background-color: #1e1b4b; }
    25% { background-color: #311042; }
    50% { background-color: #062f23; }
    75% { background-color: #420f1c; }
    100% { background-color: #1e1b4b; }
}

.party-mode .glow-bg-1 {
    background: radial-gradient(circle, rgba(236, 72, 153, 0.4) 0%, rgba(0,0,0,0) 70%);
    animation: partyOrb1 1.5s infinite alternate;
}

.party-mode .glow-bg-2 {
    background: radial-gradient(circle, rgba(234, 179, 8, 0.4) 0%, rgba(0,0,0,0) 70%);
    animation: partyOrb2 1.5s infinite alternate;
}

@keyframes partyOrb1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(150px, 100px) scale(1.5); }
}

@keyframes partyOrb2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-150px, -100px) scale(1.5); }
}

.party-mode .counter-card {
    animation: shake 0.2s infinite;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(0px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(2px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(2px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

/* Sidebar Column Layout */
.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Responsive YouTube Embed Container */
.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background: #000;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Jukebox Track Selector */
.music-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
    gap: 15px;
}

.music-card-header .section-title {
    margin-bottom: 0;
}

.track-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.track-select:focus, .track-select:hover {
    border-color: var(--donnie-yellow);
    background: rgba(255, 255, 255, 0.1);
}

.track-select option {
    background: #0f172a;
    color: #fff;
    font-weight: 600;
    padding: 10px;
}
