/* CSS Custom Properties for Theming */
:root {
    /* Light Theme */
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8e8;
    --bg-quaternary: #d0d0d0;
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-inverse: #ffffff;
    --border-color: #e0e0e0;
    --border-color-secondary: #bdbdbd;
    --error-color: #d32f2f;
    --success-color: #388e3c;
    --info-color: #1976d2;
    --warning-color: #f57c00;
    --accent-color: #ffc107;
    --shadow-light: rgba(0,0,0,0.1);
    --shadow-medium: rgba(0,0,0,0.2);
    --shadow-heavy: rgba(0,0,0,0.3);
    
    /* Note colors for light theme */
    --note-1000: #8d6e63;
    --note-1000-alt: #ff7043;
    --note-500: #42a5f5;
    --note-200: #66bb6a;
    --note-100: #ffb74d;
    --note-50: #ab47bc;
    --note-20: #4fc3f7;
    --note-10: #ff8a65;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-quaternary: #222222;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-inverse: #ffffff;
    --border-color: #2a2a2a;
    --border-color-secondary: #333333;
    --error-color: #f44336;
    --success-color: #4caf50;
    --info-color: #2196f3;
    --warning-color: #ff9800;
    --accent-color: #ffc107;
    --shadow-light: rgba(0,0,0,0.5);
    --shadow-medium: rgba(0,0,0,0.7);
    --shadow-heavy: rgba(0,0,0,0.9);
    
    /* Dramatically different note colors for dark theme */
    --note-1000: #6d4c41;
    --note-1000-alt: #d84315;
    --note-500: #1976d2;
    --note-200: #388e3c;
    --note-100: #f57c00;
    --note-50: #7b1fa2;
    --note-20: #0288d1;
    --note-10: #e65100;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* App Header */
.app-header {
    background: var(--bg-primary);
    padding: 6px 12px;
    border-bottom: 1px solid var(--border-color);
}

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

.app-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    opacity: 0.8;
}

.app-title {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}

body {
    font-family: 'Montserrat', 'Segoe UI', 'Roboto', 'Arial Black', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 0 20px 20px 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Controls Section */
.controls {
    max-width: 1200px;
    margin: 16px auto 20px auto;
    background: var(--bg-secondary);
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.controls-toggle {
    position: absolute;
    top: 10px;
    right: 15px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

.controls-toggle:hover {
    background: var(--bg-quaternary);
    transform: scale(1.1);
}

.controls-content {
    padding: 20px;
    transition: all 0.3s ease;
}

.controls.collapsed .controls-content {
    display: none;
}

.controls.collapsed {
    padding: 0;
}

.category-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: bold;
    margin-bottom: 3px;
    color: var(--text-primary);
    transition: color 0.3s ease;
    display: flex;
    align-items: baseline;
    gap: 5px;
    line-height: 1.4;
}

/* Fix emoji alignment specifically */
.input-group label {
    align-items: center;
}

/* Ensure emojis are properly aligned */
.input-group label > * {
    display: flex;
    align-items: center;
}

.input-group input {
    padding: 8px;
    border: 1px solid var(--border-color-secondary);
    border-radius: 4px;
    font-size: 18px;
    font-family: 'Roboto Mono', 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-weight: 500;
    step: 50;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    height: 40px;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: var(--info-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}


/* Main Board */
.board {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border: 10px solid var(--bg-quaternary);
    border-radius: 15px;
    position: relative;
    min-height: 0;
    box-shadow: 0 10px 30px var(--shadow-medium);
    overflow: visible;
    transition: all 0.3s ease;
}

/* Light theme specific board styling */
:root .board {
    background: #2a2a2a;
    border-color: #1a1a1a;
}

/* Dark theme specific board styling */
[data-theme="dark"] .board {
    background: var(--bg-tertiary);
    border-color: var(--bg-quaternary);
}

.categories-container {
    display: grid;
    grid-template-columns: repeat(6, minmax(170px, 1fr));
    gap: 0;
    height: auto; /* Allow height to expand with content */
    min-height: 400px;
    transition: min-height 0.4s ease, grid-template-columns 0.3s ease;
    overflow-x: auto; /* Allow horizontal scroll on small screens */
}

/* 7-column layout when savings is enabled */
.categories-container.with-savings {
    grid-template-columns: repeat(7, minmax(160px, 1fr));
}

.category-column {
    border-right: 2px solid #1a1a1a;
    position: relative;
    padding: 10px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

[data-theme="dark"] .category-column {
    border-right-color: var(--bg-quaternary);
}

.category-column:last-child {
    border-right: none;
}

.category-header {
    background: #1a1a1a;
    color: #ffffff;
    text-align: center;
    padding: 25px 10px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #2a2a2a;
    border-radius: 0;
    font-family: 'Montserrat', 'Open Sans', 'Roboto', sans-serif;
    transition: all 0.3s ease;
    position: relative;
}

[data-theme="dark"] .category-header {
    background: var(--bg-quaternary);
    color: #ffffff !important;
    border-bottom-color: var(--bg-tertiary);
}

.money-stack {
    flex: 1;
    padding: 35px 5px 20px 5px;
    position: relative;
    min-height: 350px;
    background: #2a2a2a;
    transition: all 0.3s ease;
}

[data-theme="dark"] .money-stack {
    background: var(--bg-tertiary);
}

/* Danish Bank Notes */
.danish-note {
    width: 150px;
    height: 60px;
    border-radius: 6px;
    position: absolute;
    cursor: grab;
    transition: all 0.15s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.3);
    border: 1px solid rgba(0,0,0,0.3);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    animation: noteAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.note-content {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 6px;
    pointer-events: none;
}

.note-value-main {
    font-size: 20px;
    font-weight: 900;
    color: rgba(255,255,255,0.95);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    font-family: 'Montserrat', Arial, sans-serif;
    line-height: 1;
    align-self: flex-start;
}

.note-value-secondary {
    font-size: 8px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.6);
    font-family: 'Montserrat', Arial, sans-serif;
    margin-top: -2px;
    align-self: flex-start;
}

.note-serial {
    font-size: 6px;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    font-family: 'Courier New', monospace;
    align-self: flex-end;
    margin-top: auto;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

/* Special styling for 100kr note (orange background) */
.note-100 .note-value-main,
.note-100 .note-value-secondary {
    color: rgba(255,255,255,0.95);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.note-100 .note-serial {
    color: rgba(255,255,255,0.6);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

/* Realistic Note Design */
.note-design-realistic .danish-note {
    background: none !important;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.note-design-realistic .danish-note {
    width: 150px !important;  /* Max width that fits in 170px columns with padding */
    height: 84px !important;  /* 16:9 ratio = 150px × 84px */
}

/* Euro notes have a different aspect ratio - slightly taller */
.note-design-realistic .currency-eur {
    height: 92px !important;  /* Euro notes are taller than DKK notes */
}

/* DKK 1000kr Notes */
.note-design-realistic .currency-dkk.note-1000,
.note-design-realistic .currency-dkk.note-1000-alt { 
    background-image: url('assets/images/banknotes/1000.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    image-rendering: auto;
    color: #ffffff;
    will-change: transform;
}

/* DKK 500kr Note */
.note-design-realistic .currency-dkk.note-500 { 
    background-image: url('assets/images/banknotes/500.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    image-rendering: auto;
    color: #ffffff;
    will-change: transform;
}

/* EUR 500€ Note */
.note-design-realistic .currency-eur.note-500 { 
    background-image: url('assets/images/banknotes/euro/500.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    image-rendering: auto;
    color: #ffffff;
    will-change: transform;
}

/* DKK 200kr Note */
.note-design-realistic .currency-dkk.note-200 { 
    background-image: url('assets/images/banknotes/200.png?v=2') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    image-rendering: auto;
    color: #ffffff;
    will-change: transform;
}

/* EUR 200€ Note */
.note-design-realistic .currency-eur.note-200 { 
    background-image: url('assets/images/banknotes/euro/200.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    image-rendering: auto;
    color: #ffffff;
    will-change: transform;
}

/* DKK 100kr Note */
.note-design-realistic .currency-dkk.note-100 { 
    background-image: url('assets/images/banknotes/100.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    image-rendering: auto;
    color: #ffffff;
    will-change: transform;
}

/* EUR 100€ Note */
.note-design-realistic .currency-eur.note-100 { 
    background-image: url('assets/images/banknotes/euro/100.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    image-rendering: auto;
    color: #ffffff;
    will-change: transform;
}

/* DKK 50kr Note */
.note-design-realistic .currency-dkk.note-50 { 
    background-image: url('assets/images/banknotes/50.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    image-rendering: auto;
    color: #ffffff;
    will-change: transform;
}

/* EUR 50€ Note */
.note-design-realistic .currency-eur.note-50 { 
    background-image: url('assets/images/banknotes/euro/50.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    image-rendering: auto;
    color: #ffffff;
    will-change: transform;
}

/* EUR 20€ Note */
.note-design-realistic .currency-eur.note-20 { 
    background-image: url('assets/images/banknotes/euro/20.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    image-rendering: auto;
    color: #ffffff;
    will-change: transform;
}

/* EUR 10€ Note */
.note-design-realistic .currency-eur.note-10 { 
    background-image: url('assets/images/banknotes/euro/10.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    image-rendering: auto;
    color: #ffffff;
    will-change: transform;
}

.note-design-realistic .danish-note::before,
.note-design-realistic .danish-note::after {
    display: none;
}

.note-design-realistic .note-content {
    justify-content: center;
    align-items: center;
}

.note-design-realistic .note-value-main {
    display: none;
}

.note-design-realistic .note-value-secondary,
.note-design-realistic .note-serial {
    display: none;
}

/* Classic Note Design */
.note-design-classic .danish-note {
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3), inset 0 0 10px rgba(255,255,255,0.1);
    border: 1px solid rgba(0,0,0,0.5);
}

.note-design-classic .note-1000 { 
    background: linear-gradient(45deg, #BA2F22 0%, #941f17 100%);
}

.note-design-classic .note-1000-alt { 
    background: linear-gradient(45deg, #BA2F22 0%, #941f17 100%);
}

.note-design-classic .note-500 { 
    background: linear-gradient(45deg, #005CA6 0%, #003d6b 100%);
}

.note-design-classic .note-200 { 
    background: linear-gradient(45deg, #49AE43 0%, #2d6b29 100%);
}

.note-design-classic .note-100 { 
    background: linear-gradient(45deg, #E6993A 0%, #b8752a 100%);
}

.note-design-classic .note-50 { 
    background: linear-gradient(45deg, #6B6587 0%, #4f4a61 100%);
}

.note-design-classic .danish-note::before {
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.1) 2px,
        rgba(255,255,255,0.1) 4px
    );
}

.note-design-classic .note-value-main {
    font-family: 'Times New Roman', serif;
    font-size: 22px;
    text-decoration: underline;
}

/* Note entrance animation */
@keyframes noteAppear {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.8) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1) translateY(0);
    }
}

/* Note exit animation */
@keyframes noteDisappear {
    0% {
        opacity: 1;
        transform: translateX(-50%) scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) scale(0.8) translateY(20px);
    }
}

/* Staggered animation for multiple notes */
.danish-note:nth-child(1) { animation-delay: 0ms; }
.danish-note:nth-child(2) { animation-delay: 100ms; }
.danish-note:nth-child(3) { animation-delay: 200ms; }
.danish-note:nth-child(4) { animation-delay: 300ms; }
.danish-note:nth-child(5) { animation-delay: 400ms; }
.danish-note:nth-child(6) { animation-delay: 500ms; }
.danish-note:nth-child(7) { animation-delay: 600ms; }
.danish-note:nth-child(8) { animation-delay: 700ms; }
.danish-note:nth-child(9) { animation-delay: 800ms; }
.danish-note:nth-child(10) { animation-delay: 900ms; }

.danish-note:hover {
    transform: translateX(-50%) scale(1.08) rotate(3deg);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    z-index: 100;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.danish-note.dragging {
    cursor: grabbing;
    transform: translateX(-50%) rotate(8deg) scale(1.15);
    z-index: 1000;
    opacity: 0.9;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    transition: transform 0.1s ease-out, opacity 0.1s ease;
    animation: none;
}

/* No transition during repositioning for instant drag & drop */
.danish-note.repositioning {
    transition: none !important;
}

/* Touch-specific dragging state */
.danish-note.touch-dragging {
    z-index: 1000;
    opacity: 0.95;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    transition: none !important;
    animation: none !important;
    cursor: grabbing;
}

/* Immediate touch response for better mobile UX */
.danish-note.long-press-ready {
    z-index: 999;
    transition: none !important;
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* Enhanced drop zone feedback for touch */
.drop-zone-active {
    background-color: rgba(76, 175, 80, 0.2) !important;
    outline: 3px solid #4caf50 !important;
    outline-offset: -3px;
    animation: dropZonePulse 1s ease-in-out infinite;
}

@keyframes dropZonePulse {
    0%, 100% {
        transform: scale(1);
        outline-color: #4caf50;
    }
    50% {
        transform: scale(1.02);
        outline-color: #66bb6a;
    }
}

/* Enhanced mobile drop zone feedback */
.drop-zone-animate {
    animation: dropZoneAppear 0.3s ease-out;
}

@keyframes dropZoneAppear {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Long-press ready state for banknotes */
.long-press-ready {
    animation: longPressReady 0.2s ease-out forwards;
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.5), 0 8px 25px rgba(0,0,0,0.3);
}

@keyframes longPressReady {
    0% {
        transform: translateX(-50%) scale(1);
    }
    100% {
        transform: translateX(-50%) scale(1.05);
    }
}

/* Enhanced drop zone feedback for mobile devices */
@media (hover: none) and (pointer: coarse) {
    .drop-zone {
        background-color: rgba(52, 152, 219, 0.15) !important;
        outline: 3px dashed #3498db;
        outline-offset: -6px;
        border-radius: 8px;
    }
    
    .drop-zone-active {
        background-color: rgba(76, 175, 80, 0.25) !important;
        outline: 4px solid #4caf50 !important;
        outline-offset: -4px;
        box-shadow: inset 0 0 20px rgba(76, 175, 80, 0.3);
        animation: dropZonePulseMobile 0.8s ease-in-out infinite;
    }
    
    @keyframes dropZonePulseMobile {
        0%, 100% {
            transform: scale(1);
            outline-color: #4caf50;
            box-shadow: inset 0 0 20px rgba(76, 175, 80, 0.3);
        }
        50% {
            transform: scale(1.03);
            outline-color: #66bb6a;
            box-shadow: inset 0 0 30px rgba(76, 175, 80, 0.4);
        }
    }
}

/* Enhanced snap and boing animations for touch interactions */
@keyframes boingSuccess {
    0% {
        transform: translateX(-50%) scale(1.2) rotate(0deg);
    }
    30% {
        transform: translateX(-50%) scale(1.35) rotate(-2deg);
    }
    70% {
        transform: translateX(-50%) scale(0.95) rotate(1deg);
    }
    100% {
        transform: translateX(-50%) scale(1) rotate(0deg);
    }
}

@keyframes elasticSnapBack {
    0% {
        transform: translateX(-50%) scale(1.1) rotate(5deg);
    }
    20% {
        transform: translateX(-50%) scale(1.3) rotate(-8deg);
    }
    40% {
        transform: translateX(-50%) scale(0.9) rotate(3deg);
    }
    60% {
        transform: translateX(-50%) scale(1.05) rotate(-1deg);
    }
    80% {
        transform: translateX(-50%) scale(0.98) rotate(0deg);
    }
    100% {
        transform: translateX(-50%) scale(1) rotate(0deg);
    }
}

@keyframes noteSuccessBoing {
    0% {
        transform: translateX(-50%) scale(1);
    }
    25% {
        transform: translateX(-50%) scale(1.15) rotate(-3deg);
    }
    50% {
        transform: translateX(-50%) scale(1.25) rotate(2deg);
    }
    75% {
        transform: translateX(-50%) scale(0.95) rotate(-1deg);
    }
    100% {
        transform: translateX(-50%) scale(1) rotate(0deg);
    }
}

/* Enhanced note drop animation class */
.note-drop-success {
    animation: boingSuccess 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.note-snap-back {
    animation: elasticSnapBack 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Mobile-optimized touch feedback */
@media (hover: none) and (pointer: coarse) {
    .long-press-ready {
        animation: longPressReady 0.15s ease-out forwards;
        box-shadow: 0 0 25px rgba(52, 152, 219, 0.6), 0 10px 30px rgba(0,0,0,0.4);
    }
    
    .note-drop-success {
        animation: noteSuccessBoing 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    }
}

/* Screen reader only utility class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


/* Simple Note Design - Gradients */
.note-design-simple .note-1000 { 
    background: linear-gradient(135deg, #BA2F22 0%, #d84c3f 50%, #BA2F22 100%);
    position: relative;
    overflow: hidden;
}

.note-design-simple .note-1000::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.1) 2px, rgba(255,255,255,0.1) 4px);
    pointer-events: none;
}

.note-design-simple .note-1000::after {
    display: none;
}

.note-design-simple .note-1000-alt { 
    background: linear-gradient(135deg, #BA2F22 0%, #cc3f35 50%, #BA2F22 100%);
    position: relative;
    overflow: hidden;
}

.note-design-simple .note-1000-alt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(255,255,255,0.1) 2px, rgba(255,255,255,0.1) 4px);
    pointer-events: none;
}

.note-design-simple .note-1000-alt::after {
    display: none;
}

.note-design-simple .note-500 { 
    background: linear-gradient(135deg, #005CA6 0%, #2680c9 50%, #005CA6 100%);
    position: relative;
    overflow: hidden;
}

.note-design-simple .note-500::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(255,255,255,0.1) 3px, rgba(255,255,255,0.1) 5px);
    pointer-events: none;
}

.note-design-simple .note-500::after {
    display: none;
}

.note-design-simple .note-200 { 
    background: linear-gradient(135deg, #49AE43 0%, #6bc45f 50%, #49AE43 100%);
    position: relative;
    overflow: hidden;
}

.note-design-simple .note-200::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(60deg, transparent, transparent 2px, rgba(255,255,255,0.1) 2px, rgba(255,255,255,0.1) 4px);
    pointer-events: none;
}

.note-design-simple .note-200::after {
    display: none;
}

.note-design-simple .note-100 { 
    background: linear-gradient(135deg, #E6993A 0%, #f0a958 50%, #E6993A 100%);
    position: relative;
    overflow: hidden;
}

.note-design-simple .note-100::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(30deg, transparent, transparent 2px, rgba(255,255,255,0.1) 2px, rgba(255,255,255,0.1) 4px);
    pointer-events: none;
}

.note-design-simple .note-100::after {
    display: none;
}

.note-design-simple .note-50 { 
    background: linear-gradient(135deg, #6B6587 0%, #8a839f 50%, #6B6587 100%);
    position: relative;
    overflow: hidden;
}

.note-design-simple .note-50::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(120deg, transparent, transparent 2px, rgba(255,255,255,0.1) 2px, rgba(255,255,255,0.1) 4px);
    pointer-events: none;
}

.note-design-simple .note-50::after {
    display: none;
}

.note-design-simple .note-20 { 
    background: linear-gradient(135deg, #00BCD4 0%, #26c6da 50%, #00BCD4 100%);
    position: relative;
    overflow: hidden;
}

.note-design-simple .note-20::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
}

.note-design-simple .note-20::after {
    display: none;
}

.note-design-simple .note-10 { 
    background: linear-gradient(135deg, #FF7043 0%, #ff8a65 50%, #FF7043 100%);
    position: relative;
    overflow: hidden;
}

.note-design-simple .note-10::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
}

.note-design-simple .note-10::after {
    display: none;
}

/* Category Totals */
.category-total {
    text-align: center;
    padding: 20px 5px;
    font-size: 2.2em;
    font-weight: 900;
    color: #ffffff;
    margin-top: auto;
    border-top: 2px solid #1a1a1a;
    background: #2a2a2a;
    border-radius: 0;
    font-family: 'Montserrat', 'Open Sans', 'Roboto', sans-serif;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.category-total.updating {
    /* Removed blinking animation */
}

[data-theme="dark"] .category-total {
    background: var(--bg-tertiary);
    border-top-color: var(--bg-quaternary);
    color: #ffffff;
}

/* Grand Total */
.grand-total {
    background: #1a1a1a;
    color: #3498db;
    text-align: center;
    padding: 20px;
    font-size: 1.8em;
    font-weight: 900;
    border-radius: 0;
    border-top: 3px solid #3498db;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-family: 'Montserrat', 'Open Sans', 'Roboto', sans-serif;
    transition: all 0.3s ease;
}

[data-theme="dark"] .grand-total {
    background: var(--bg-quaternary);
    color: #3498db;
    border-top-color: #3498db;
}

.total-label {
    color: #3498db;
    font-size: 0.8em;
    letter-spacing: 2px;
}

[data-theme="dark"] .total-label {
    color: #3498db;
}

.total-amount {
    color: #ffffff;
    font-size: 1.2em;
}

[data-theme="dark"] .total-amount {
    color: #ffffff;
}

/* Drag and Drop */
.drop-zone {
    background-color: rgba(52, 152, 219, 0.1) !important;
    outline: 2px dashed #3498db;
    outline-offset: -5px;
}

/* Focus styles for accessibility */
.danish-note:focus,
.money-stack:focus {
    outline: 2px solid var(--info-color);
    outline-offset: 2px;
}

.money-stack:focus {
    background-color: rgba(33, 150, 243, 0.1);
}

/* Controls Row */
.controls-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 1000kr Toggle Control - now inline with other controls */

/* Savings Toggle Control */
/* Additional savings toggle specific styles */
.savings-toggle-label.control-box {
    gap: 8px;
    justify-content: flex-start !important; /* Align content to left */
    padding: 0 16px !important; /* More padding for internal elements */
}

.control-box .savings-input {
    width: 70px; /* Adjusted for 180px container */
    height: 26px !important; /* Smaller height to fit in 40px container */
    min-height: 26px !important;
    max-height: 26px !important;
    padding: 4px 8px !important;
    border: 1px solid var(--border-color-secondary);
    border-radius: 3px;
    font-size: 13px;
    font-family: 'Roboto Mono', 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    margin: 0 !important;
    box-sizing: border-box !important;
    flex-shrink: 0;
}

/* Category Icon Styling */
.category-icon {
    display: block;
    margin: 0 auto 8px auto;
    filter: brightness(1.1);
}

/* Ensure category header properly centers icon above text */
.category-header {
    flex-direction: column !important;
}

.control-box .savings-input:enabled {
    background: var(--bg-secondary);
    border-color: var(--info-color);
}

.control-box .savings-input:disabled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    opacity: 0.6;
}

.control-box .savings-input:focus {
    outline: none;
    border-color: var(--info-color);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

/* Savings Column Styling - Normal styling like other columns */
.savings-column {
    /* No special styling - inherits from .category-column */
}

.savings-column .category-header {
    /* Use same styling as other headers */
}

/* Additional toggle-label specific styles */
.toggle-label.control-box {
    gap: 10px;
}

/* Checkbox styling handled by .control-box input[type="checkbox"] above */

.toggle-text {
    font-size: 14px;
}

.toggle-info {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
    margin-left: 30px;
}

.import-btn.control-box {
    background: var(--success-color);
    border: 1px solid var(--success-color);
    color: var(--text-inverse);
}

.import-btn.control-box:hover {
    background: #2e7d2e;
    border-color: #2e7d2e;
    transform: translateY(-1px);
}



.theme-toggle-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-tertiary);
    color: var(--text-inverse);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

[data-theme="dark"] .theme-toggle-floating {
    background: var(--bg-quaternary);
    color: #ffffff;
}

.theme-toggle-floating:hover {
    background: var(--bg-quaternary);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

[data-theme="dark"] .theme-toggle-floating:hover {
    background: var(--bg-tertiary);
}

.theme-toggle-floating:active {
    transform: scale(0.9);
    transition: all 0.1s ease;
}

.budget-controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    align-items: stretch;
    width: 100%;
    justify-items: stretch;
}

/* Error message should not participate in grid */
.budget-controls .error-message {
    grid-column: 1 / -1; /* Span full width */
    margin-top: 5px;
}

/* Responsive grid for smaller screens */
@media (max-width: 900px) {
    .budget-controls {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .budget-controls {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .control-box {
        font-size: 13px;
        padding: 0 8px;
        min-width: auto;
    }
}

/* Unified control box styling for consistent alignment */
.control-box {
    /* Reset all browser defaults aggressively */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-clip: padding-box;
    
    /* Universal sizing and layout - FORCE exact height */
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    width: 100%;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 12px !important;
    
    /* Flexbox for perfect centering */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    flex-shrink: 0;
    
    /* Visual styling */
    border-radius: 4px;
    border: 1px solid var(--border-color-secondary);
    background: var(--bg-secondary);
    color: var(--text-primary);
    
    /* Typography */
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    
    /* Interactions */
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.control-box:hover {
    background: var(--bg-tertiary);
    border-color: var(--info-color);
    transform: translateY(-1px);
}

.control-box:focus {
    outline: none;
    border-color: var(--info-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

/* Specific overrides for different element types */
select.control-box {
    cursor: pointer;
    padding-right: 30px; /* Space for dropdown arrow */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

button.control-box {
    cursor: pointer;
    font-weight: 600;
}

label.control-box {
    cursor: pointer;
    justify-content: flex-start !important;
    padding: 0 16px !important;
}

/* Input inside label controls */
.control-box input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    border: 2px solid var(--border-color-secondary);
    border-radius: 3px;
    background: var(--bg-secondary);
    margin: 0 !important;
    flex-shrink: 0;
    position: relative;
    box-sizing: border-box !important;
}

.control-box input[type="checkbox"]:checked {
    background: var(--info-color);
    border-color: var(--info-color);
}

.control-box input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

#budgetName {
    flex: 1;
    min-width: 150px;
    max-width: 250px;
    padding: 8px;
    border: 1px solid var(--border-color-secondary);
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    height: 40px;
    box-sizing: border-box;
}

#budgetName:focus {
    outline: none;
    border-color: var(--info-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.budget-select-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.budget-select-group select {
    flex: 1;
    width: 132px;
}

/* Grid-based controls - widths handled by grid template */
#currencySelect.control-box,
.share-btn.control-box,
.export-btn.control-box {
    /* Width handled by grid */
}

#budgetTemplates.control-box {
    font-size: 13px;
}

.delete-budget-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 50%, #e74c3c 100%);
    color: white;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 40px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.delete-budget-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 50%, #c0392b 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.delete-budget-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

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

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

/* Focus styles handled by .control-box:focus above */

.save-btn, .share-btn, .export-btn {
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: var(--text-inverse);
    position: relative;
    overflow: hidden;
}

.share-btn.control-box, .export-btn.control-box {
    background: var(--info-color);
    border: 1px solid var(--info-color);
}

.share-btn.control-box:hover, .export-btn.control-box:hover {
    background: #1565c0;
    border-color: #1565c0;
}

.save-btn::before, .share-btn::before, .export-btn::before, .theme-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.save-btn:hover::before, .share-btn:hover::before, .export-btn:hover::before, .theme-toggle:hover::before {
    left: 100%;
}

.save-btn {
    background: var(--success-color);
}

.save-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.share-btn {
    background: #3498db;
}

.share-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.export-btn {
    background: var(--warning-color);
}

.export-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--shadow-heavy);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

.modal-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px var(--shadow-heavy);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.modal-body {
    padding: 20px;
}

.export-option {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-align: left;
    transition: background 0.2s;
    color: var(--text-primary);
}

.export-option:hover {
    background: var(--bg-quaternary);
    border-color: var(--border-color-secondary);
}

.share-link-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.share-link-container input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

.share-link-container button {
    padding: 10px 15px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.share-link-container button:hover {
    background: #0056b3;
}

/* Error Messages */
.error-message {
    color: var(--error-color);
    font-size: 0.9em;
    margin-top: 5px;
    min-height: 1.2em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.input-group input.error {
    border-color: var(--error-color);
    box-shadow: 0 0 5px rgba(217, 83, 79, 0.3);
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .danish-note {
        width: 130px;
        height: 52px;
        font-size: 14px;
        touch-action: none;
    }
    
    .danish-note:hover {
        transform: none;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    .money-stack {
        padding: 25px 5px 15px 5px;
        min-height: 300px;
    }
    
    .category-header {
        padding: 20px 5px;
        height: 70px;
        font-size: 1.1em;
    }
}

/* Prevent scrolling during touch drag */
body.touch-dragging {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 900px) {
    .categories-container {
        grid-template-columns: repeat(3, minmax(170px, 1fr));
    }
    
    .categories-container.with-savings {
        grid-template-columns: repeat(4, minmax(160px, 1fr));
    }
}

@media (max-width: 900px) {
    .budget-controls {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    #budgetName, #savedBudgets, #budgetTemplates, #noteDesign {
        min-width: auto;
        max-width: none;
        width: 100%;
        flex: none;
    }
    
    .controls-row {
        flex-direction: column;
    }
    
    .theme-toggle-floating {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .controls-toggle {
        width: 28px;
        height: 28px;
        font-size: 12px;
        top: 8px;
        right: 12px;
    }
}

@media (max-width: 600px) {
    .categories-container {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
    
    .categories-container.with-savings {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
    
    .category-total {
        font-size: 1.8em;
    }
    
    .danish-note {
        width: 120px;
        height: 48px;
    }
    
    .grand-total {
        flex-direction: column;
        gap: 10px;
        font-size: 1.5em;
    }
    
    /* Tighter spacing for mobile input fields */
    .input-group {
        margin-bottom: 12px; /* Reduced from default spacing */
    }
    
    .input-group label {
        margin-bottom: 2px; /* Reduced from 3px */
        font-size: 14px; /* Slightly smaller text */
    }
    
    .input-group input {
        padding: 6px; /* Reduced from 8px */
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Mobile header adjustments */
    .app-header {
        padding: 4px 8px;
    }
    
    .app-logo {
        height: 24px;
    }
    
    .app-title {
        font-size: 0.8em;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .budget-controls {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .save-btn, .share-btn, .export-btn {
        padding: 0 12px;
        font-size: 12px;
        height: 36px;
    }
    
    .theme-toggle-floating {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .controls-toggle {
        width: 26px;
        height: 26px;
        font-size: 10px;
        top: 6px;
        right: 10px;
    }
    
    #noteDesign {
        font-size: 12px;
        padding: 6px;
        height: 36px;
    }
    
    #budgetName, #savedBudgets, #budgetTemplates, #noteDesign {
        height: 36px;
    }
}

/* Very small screens - single column layout for savings */
@media (max-width: 400px) {
    .categories-container {
        grid-template-columns: 1fr;
        overflow-x: visible;
    }
    
    .categories-container.with-savings {
        grid-template-columns: 1fr;
    }
    
    .danish-note {
        width: 110px;
        height: 44px;
    }
    
    .category-column {
        min-width: 130px; /* Ensure minimum width for banknotes */
        margin-bottom: 20px;
    }
}

/* Colorful Game Style Design */
.note-design-monopoly .danish-note {
    border: 2px solid #2d2d2d;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.6);
    position: relative;
    overflow: hidden;
}

.note-design-monopoly .danish-note::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid #2d2d2d;
    border-radius: 2px;
    background: none;
    pointer-events: none;
}

.note-design-monopoly .danish-note::after {
    display: none;
}

.note-design-monopoly .note-1000 { 
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 50%, #e74c3c 100%);
    color: #ffffff;
}

.note-design-monopoly .note-1000-alt { 
    background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 50%, #8e44ad 100%);
    color: #ffffff;
}

.note-design-monopoly .note-500 { 
    background: linear-gradient(135deg, #3498db 0%, #2980b9 50%, #3498db 100%);
    color: #ffffff;
}

.note-design-monopoly .note-200 { 
    background: linear-gradient(135deg, #27ae60 0%, #229954 50%, #27ae60 100%);
    color: #ffffff;
}

.note-design-monopoly .note-100 { 
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 50%, #f39c12 100%);
    color: #ffffff;
}

.note-design-monopoly .note-50 { 
    background: linear-gradient(135deg, #f1c40f 0%, #f4d03f 50%, #f1c40f 100%);
    color: #2d2d2d;
}

.note-design-monopoly .note-20 { 
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 50%, #1abc9c 100%);
    color: #ffffff;
}

.note-design-monopoly .note-10 { 
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 50%, #e74c3c 100%);
    color: #ffffff;
}

.note-design-monopoly .note-value-main {
    font-family: 'Arial Black', Arial, sans-serif;
    font-weight: 900;
    font-size: 1.8em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 1px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.note-design-monopoly .note-value-secondary {
    display: none;
}

.note-design-monopoly .note-serial {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 0.35em;
    color: rgba(0,0,0,0.5);
    }

/* Print-friendly CSS for browser printing */
@media print {
    /* Hide non-essential UI elements when printing */
    .controls,
    .theme-toggle-floating,
    .modal,
    .controls-toggle {
        display: none !important;
    }
    
    /* Optimize board for print */
    .board {
        background: white !important;
        color: black !important;
        margin: 0 !important;
        padding: 20px !important;
        box-shadow: none !important;
    }
    
    /* Ensure banknotes print well */
    .danish-note {
        break-inside: avoid;
        background: white !important;
        border: 1px solid #ccc !important;
        color: black !important;
    }
    
    /* Print-friendly category headers */
    .category-header {
        color: black !important;
        font-weight: bold !important;
        background: #f5f5f5 !important;
        border-bottom: 2px solid #333 !important;
    }
    
    /* Ensure totals are visible */
    .category-total,
    .grand-total {
        color: black !important;
        font-weight: bold !important;
    }
    
    /* Page breaks and layout */
    .categories-container {
        page-break-inside: avoid;
    }
    
    /* Print header with branding */
    .board::before {
        content: "BudgetBuilder.dk - Budget Oversigt";
        display: block;
        text-align: center;
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 20px;
        border-bottom: 2px solid #333;
        padding-bottom: 10px;
    }
    
    /* Force white background for all elements */
    * {
        background: white !important;
        color: black !important;
    }
}