:root {
    /* Ultra-Modern Dark Theme */
    --bg-primary: #080811;
    --bg-secondary: #0f0f1e;
    --bg-tertiary: #16162b;
    --bg-card: rgba(20, 20, 40, 0.7);
    --bg-card-hover: rgba(30, 30, 55, 0.9);
    
    /* Premium Text Colors */
    --text-primary: #f8f9fc;
    --text-secondary: #c5c7d8;
    --text-tertiary: #8b8da8;
    --text-muted: #5a5c75;
    
    /* Vibrant Accent Colors - Neon Gradients */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #d946ef;
    --accent-cyan: #06b6d4;
    --accent-hover: #4f46e5;
    --accent-light: rgba(99, 102, 241, 0.15);
    
    /* Modern Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-secondary: linear-gradient(135deg, #5b86e5 0%, #36d1dc 100%);
    --gradient-tertiary: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-success: linear-gradient(135deg, #0cebeb 0%, #20e3b2 50%, #29ffc6 100%);
    --gradient-glow: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    --gradient-mesh: 
        radial-gradient(at 0% 0%, rgba(102, 126, 234, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(118, 75, 162, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(240, 147, 251, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(54, 209, 220, 0.15) 0px, transparent 50%);
    
    /* Premium Borders & Shadows */
    --border-color: rgba(99, 102, 241, 0.2);
    --border-hover: rgba(99, 102, 241, 0.5);
    --border-glow: rgba(102, 126, 234, 0.6);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 50px rgba(102, 126, 234, 0.5);
    --shadow-glow-hover: 0 0 80px rgba(102, 126, 234, 0.7), 0 0 120px rgba(118, 75, 162, 0.5);
    --shadow-neon: 0 0 20px rgba(99, 102, 241, 0.8), 0 0 40px rgba(99, 102, 241, 0.4);
    
    /* Status Colors - Vibrant */
    --success: #0cebeb;
    --success-glow: rgba(12, 235, 235, 0.3);
    --error: #ff4d6d;
    --error-glow: rgba(255, 77, 109, 0.3);
    --warning: #ffbe0b;
    --warning-glow: rgba(255, 190, 11, 0.3);
    --info: #4cc9f0;
    --info-glow: rgba(76, 201, 240, 0.3);
    
    /* Animation & Transition */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Spacing */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* View Transitions API - Płynne przejścia */
@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.25s;
}

::view-transition-old(root) {
    animation-name: fade-out;
}

::view-transition-new(root) {
    animation-name: fade-in;
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Blokada zaznaczania tekstu + główny styl body */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-primary);
    background-image: var(--gradient-mesh);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: -0.01em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Blokada zaznaczania tekstu */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Zezwól na zaznaczanie tylko w polach tekstowych */
input,
textarea,
[contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Ultra-Modern Animated Mesh Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(102, 126, 234, 0.5), transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(118, 75, 162, 0.4), transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(240, 147, 251, 0.3), transparent 50%),
        radial-gradient(circle at 75% 15%, rgba(54, 209, 220, 0.4), transparent 40%),
        radial-gradient(circle at 25% 85%, rgba(250, 112, 154, 0.3), transparent 40%);
    background-size: 300% 300%;
    background-position: 0% 0%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
    filter: blur(60px);
    will-change: auto;
}

/* Animacja tylko na desktop */
@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
    body::before {
        animation: meshFlow 25s ease-in-out infinite;
    }
}

@keyframes meshFlow {
    0%, 100% { 
        background-position: 0% 50%;
        opacity: 0.7;
    }
    25% {
        background-position: 100% 50%;
        opacity: 0.8;
    }
    50% { 
        background-position: 50% 100%;
        opacity: 0.6;
    }
    75% {
        background-position: 0% 100%;
        opacity: 0.75;
    }
}

/* Wszystkie elementy powyżej particles */
body > * {
    position: relative;
    z-index: 2;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ============================================
   HEADER - Premium Glassmorphism Design
   ============================================ */
header {
    background: rgba(15, 15, 30, 0.7);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    transition: all var(--transition-base);
    will-change: transform;
}

/* Scroll efekt - header zmniejsza się */
header.scrolled {
    padding: 0.75rem 0;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

header.scrolled .logo {
    font-size: 1.75rem;
}

/* Usunięto biały pasek - header::before */

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo z animowanym gradientem */
.logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 4s ease infinite;
    position: relative;
    display: inline-block;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
}

.logo:hover {
    transform: scale(1.08) translateY(-3px) rotate(-2deg);
    filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.6));
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Ikony w przyciskach nawigacji */
nav button .icon,
nav a .icon {
    font-size: 1.2rem;
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

nav button:hover .icon,
nav a:hover .icon {
    transform: scale(1.15) rotate(5deg);
}

nav button .text,
nav a .text {
    display: inline-block;
}

/* ============================================
   BUTTONS - Premium Interactive Design
   ============================================ */
button, .btn-primary, .btn-secondary, .btn-login, .btn-logout {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-bounce);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    text-align: center;
    will-change: transform;
    letter-spacing: -0.01em;
}

.btn-icon {
    font-size: 1.1rem;
    display: inline-block;
    transition: transform var(--transition-base);
}

button:hover .btn-icon {
    transform: scale(1.2) rotate(5deg);
}

button::before, .btn-primary::before, .btn-secondary::before, .btn-login::before, .btn-logout::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before, .btn-primary:hover::before, .btn-secondary:hover::before, 
.btn-login:hover::before, .btn-logout:hover::before {
    width: 300px;
    height: 300px;
}

button:active, .btn-primary:active, .btn-secondary:active, .btn-login:active, .btn-logout:active {
    transform: scale(0.94);
    transition: transform 0.1s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-hover);
}

.btn-secondary {
    background: rgba(28, 28, 46, 0.8);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(37, 37, 63, 0.9);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-login {
    background: transparent;
    border: 2px solid;
    border-image: var(--gradient-primary) 1;
    color: var(--accent-primary);
    position: relative;
    background-clip: padding-box;
}

.btn-login:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-logout {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px var(--error-glow);
}

.btn-logout:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.4);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* ============================================
   HERO SECTION - Futuristic Design
   ============================================ */
.hero-section {
    max-width: 750px;
    margin: 0 auto;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

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


.hero-section h2 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 5s ease infinite, textFloat 3s ease-in-out infinite;
    letter-spacing: -2px;
    line-height: 1.1;
    filter: drop-shadow(0 0 60px rgba(102, 126, 234, 0.5));
}

@keyframes textFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-bottom: 3rem;
    font-weight: 400;
    line-height: 1.8;
}

/* ============================================
   NOTE FORM - Glassmorphism Card
   ============================================ */
.note-form {
    background: rgba(20, 20, 40, 0.5);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    padding: 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-slow);
}

/* Form Header */
.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.form-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    padding: 0.375rem 0.875rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    font-family: 'Consolas', monospace;
}

/* Form Footer */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
}

.char-counter {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

#charCount {
    font-weight: 700;
    transition: color var(--transition-fast);
}

@keyframes cardPulse {
    0%, 100% { box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
    50% { box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
}

.note-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.8;
}

.note-form:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-glow-hover), inset 0 2px 0 rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    animation: none;
}

.note-form textarea,
textarea {
    width: 100%;
    padding: 1.5rem;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: inherit;
    resize: none;
    transition: all var(--transition-base);
    line-height: 1.8;
    min-height: 180px;
}

.note-form textarea:focus,
textarea:focus {
    outline: none;
    background: rgba(99, 102, 241, 0.03);
}

textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(28, 28, 46, 0.95);
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.15), 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 60px rgba(99, 102, 241, 0.2);
    transform: translateY(-4px) scale(1.005);
}

/* ============================================
   LOGIN CONTAINER - Premium Card
   ============================================ */
/* ============================================
   LOGIN CONTAINER - Premium Design
   ============================================ */
.login-container {
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    padding: 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

/* Glow animation tylko na desktop */
@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
    .login-container {
        animation: fadeInUp 0.6s ease-out, glow 3s ease-in-out infinite;
    }
}

.login-header {
    text-align: center;
    padding: 1.5rem 1.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.login-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.5rem;
}

#loginForm {
    padding: 1.5rem 1.75rem;
}

.login-footer {
    padding: 1.25rem 2rem;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.login-footer p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin: 0;
}

.login-footer strong {
    color: var(--text-secondary);
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 24px 24px 0 0;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 0.75rem;
    font-size: 1.85rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

.label-icon {
    font-size: 1.1rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem;
    background: rgba(28, 28, 46, 0.8);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, box-shadow;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(28, 28, 46, 0.95);
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.15), 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 50px rgba(99, 102, 241, 0.2);
    transform: translateY(-3px) scale(1.01);
}

.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    cursor: pointer;
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.checkbox-label:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--border-hover);
}

.checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.checkbox-text strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.checkbox-text small {
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

#loginForm .btn-primary {
    width: 100%;
    margin-top: 0.75rem;
}

/* Messages */
.message {
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 0.75rem;
    display: none;
    text-align: center;
    font-size: 0.95rem;
}

.message.success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    display: block;
}

.message.error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    display: block;
}

/* ============================================
   ADMIN PANEL - Modern Dashboard
   ============================================ */
.admin-header {
    margin-bottom: 3rem;
}

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

.admin-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: var(--border-hover);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.25rem;
    padding-left: 3rem;
    background: rgba(28, 28, 46, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(28, 28, 46, 0.95);
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.2), 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 60px rgba(99, 102, 241, 0.25);
    transform: translateY(-3px) scale(1.01);
}

.search-box input::placeholder {
    color: var(--text-tertiary);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
}

.filters {
    display: flex;
    gap: 0.5rem;
}

.sync-status {
    padding: 0.75rem 1rem;
    background-color: var(--accent-light);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    font-size: 0.9rem;
    animation: pulse 2s ease-in-out infinite;
}

.sync-status.success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: var(--success);
    animation: none;
}

.sync-status.error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
    animation: none;
}

.sync-icon {
    font-size: 1.2rem;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(28, 28, 46, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

/* ============================================
   NOTES GRID - Premium Cards Layout
   ============================================ */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    animation: fadeIn 0.5s ease-out;
}

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

.note-card {
    background: rgba(30, 30, 48, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: cardSlideIn 0.5s ease-out backwards;
}

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

/* Staggered animation dla kart */
.note-card:nth-child(1) { animation-delay: 0.05s; }
.note-card:nth-child(2) { animation-delay: 0.1s; }
.note-card:nth-child(3) { animation-delay: 0.15s; }
.note-card:nth-child(4) { animation-delay: 0.2s; }
.note-card:nth-child(5) { animation-delay: 0.25s; }
.note-card:nth-child(6) { animation-delay: 0.3s; }
.note-card:nth-child(n+7) { animation-delay: 0.35s; }

.note-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.note-card:hover {
    transform: translateY(-12px) scale(1.03) rotate(0.5deg);
    box-shadow: var(--shadow-glow-hover), inset 0 2px 0 rgba(255, 255, 255, 0.12);
    border-color: var(--border-hover);
}

.note-card:hover::before {
    opacity: 1;
}

/* Przypięte notatki - Premium look */
.note-card.pinned {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.08));
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2), var(--shadow-md);
}

.note-card.pinned::before {
    opacity: 1;
    background: var(--gradient-primary);
}

.note-card.pinned::after {
    content: "📌";
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: pinPulse 2s ease-in-out infinite;
}

@keyframes pinPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(-5deg); }
}

.note-content {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    white-space: pre-wrap;
    max-height: 240px;
    overflow-y: auto;
    line-height: 1.8;
    font-size: 1.05rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) transparent;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.note-content::-webkit-scrollbar {
    width: 6px;
}

.note-content::-webkit-scrollbar-track {
    background: transparent;
}

.note-content::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

.note-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

.note-content mark {
    background: linear-gradient(135deg, var(--warning), #fb923c);
    color: var(--bg-primary);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

/* Akcje notatek - Premium buttons - tylko ikony */
.note-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
}

.note-actions button {
    padding: 0.5rem;
    font-size: 1.2rem;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    cursor: pointer;
}

.note-actions button:active {
    transform: scale(0.95);
}

@media (hover: hover) {
    .note-actions button:hover {
        transform: translateY(-3px) scale(1.1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

.btn-pin {
    background: linear-gradient(135deg, var(--warning), #fb923c);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
    border-color: transparent;
}

@media (hover: hover) {
    .btn-pin:hover {
        background: linear-gradient(135deg, #fb923c, #f97316);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    }
}

.btn-pin.pinned {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

@media (hover: hover) {
    .btn-pin.pinned:hover {
        background: rgba(99, 102, 241, 0.25);
        box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
    }
}

.btn-edit {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
    animation: gradientShift 3s ease infinite;
}

@media (hover: hover) {
    .btn-edit:hover {
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    }
}

.btn-delete {
    background: linear-gradient(135deg, var(--error), #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 77, 109, 0.25);
}

@media (hover: hover) {
    .btn-delete:hover {
        background: linear-gradient(135deg, #dc2626, #b91c1c);
        box-shadow: 0 4px 12px rgba(255, 77, 109, 0.4);
    }
}

/* Pusta sekcja notatek */
.no-notes {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.no-notes a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
}

.no-notes a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.no-notes a:hover {
    color: var(--accent-hover);
}

.no-notes a:hover::after {
    width: 100%;
}

/* ============================================
   MODAL - Premium Overlay
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    animation: fadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(30, 30, 48, 0.95);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--border-hover);
    border-radius: 24px;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-glow-hover), 0 30px 80px rgba(0, 0, 0, 0.7);
    animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 24px 24px 0 0;
}

@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: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
}

.close {
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-body textarea {
    margin-bottom: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   QUICK TIPS - Keyboard Shortcuts Display
   ============================================ */
.quick-tips {
    margin-top: 4rem;
    padding: 2.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    animation: fadeInUp 1s ease-out;
}

.quick-tips h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.tip-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.tip-item:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.tip-key {
    padding: 0.625rem 1.25rem;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Consolas', 'Monaco', monospace;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-neon), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: 0.05em;
}

.tip-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ============================================
   FOOTER - Subtle Design
   ============================================ */
footer {
    background: rgba(19, 19, 31, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-tertiary);
    margin-top: auto;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0.5;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent-primary));
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-primary);
}

/* ============================================
   TOUCH OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Zezwól na menu kontekstowe i zaznaczanie tekstu */
    .note-content {
        -webkit-user-select: text;
        user-select: text;
        -webkit-touch-callout: default;
        -webkit-user-callout: default;
    }
    
    /* Remove hover effects on touch devices */
    .note-card:hover,
    .tip-item:hover,
    .stat-item:hover,
    button:hover,
    .btn-primary:hover,
    .filter-btn:hover {
        transform: none;
    }
    
    /* Add active states instead */
    .note-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    button:active,
    .btn-primary:active {
        transform: scale(0.95);
    }
    
    /* Larger tap targets */
    button,
    .btn-primary,
    .btn-secondary,
    .filter-btn,
    .note-actions button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Disable 3D hover effects on cards */
    .note-card {
        transform: none !important;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    /* Performance Optimizations */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Reduce motion for better performance */
    body::before {
        animation: none;
        opacity: 0.5;
        filter: blur(40px);
    }
    
    .hero-section h2,
    .logo {
        animation: none;
        filter: none;
    }
    
    /* Typography */
    .hero-section h2 {
        font-size: 2.8rem;
        letter-spacing: -1.5px;
    }
    
    .admin-header h2 {
        font-size: 2rem;
    }

    /* Grid Layout */
    .notes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Admin Header */
    .admin-header {
        margin-bottom: 2rem;
    }
    
    .header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    
    .stats-bar {
        justify-content: center;
        flex-wrap: wrap;
    }

    .header-controls {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .search-box {
        max-width: 100%;
        width: 100%;
    }

    .filters {
        width: 100%;
        justify-content: stretch;
        gap: 0.75rem;
    }
    
    .filter-btn {
        flex: 1;
    }

    /* Navigation */
    nav {
        gap: 0.5rem;
    }
    
    nav button,
    nav a {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    /* Forms */
    .note-form {
        margin-bottom: 2rem;
    }
    
    .form-header,
    .form-footer {
        padding: 1.25rem 1.5rem;
    }
    
    .note-form textarea {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .login-container {
        margin: 1rem;
    }
    
    .login-header {
        padding: 2.5rem 2rem 1.5rem;
    }
    
    #loginForm {
        padding: 2rem;
    }
    
    .login-footer {
        padding: 1.25rem 2rem;
    }
    
    /* Note Actions - jedna linia */
    .note-actions {
        gap: 0.4rem;
        flex-wrap: nowrap !important;
        overflow-x: auto;
    }
    
    .note-actions button {
        padding: 0.5rem;
        font-size: 1rem;
        min-width: 40px;
        min-height: 40px;
        flex-shrink: 0;
        font-size: 0.85rem;
        flex: 1;
    }
    
    /* Quick Tips */
    .quick-tips {
        padding: 2rem 1.5rem;
        margin-top: 2.5rem;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* GPU Acceleration for smooth scrolling */
    .note-card,
    .note-form,
    .stat-item,
    header {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: auto;
    }
    
    /* Disable complex animations */
    .note-card,
    .tip-item,
    .stat-item {
        transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    }
    
    @keyframes cardSlideIn {
        from {
            opacity: 0;
            transform: translateY(15px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (max-width: 640px) {
    /* Typography Mobile */
    .hero-section h2 {
        font-size: 2.2rem;
        letter-spacing: -1px;
    }
    
    .admin-header h2 {
        font-size: 1.75rem;
    }
    
    /* Header Mobile */
    header {
        padding: 1rem 0;
    }
    
    header .container {
        padding: 0 1rem;
    }
    
    /* Navigation - tylko ikony */
    nav button .text,
    nav a .text {
        display: none;
    }
    
    nav button .icon,
    nav a .icon {
        margin-right: 0;
        font-size: 1.5rem;
    }
    
    nav button,
    nav a {
        padding: 0.875rem;
        min-width: 52px;
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: var(--radius-md);
    }
    
    /* Stats - stack vertically */
    .stats-bar {
        width: 100%;
    }
    
    .stat-item {
        flex: 1;
        padding: 0.875rem 1.5rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    /* Search Box Mobile */
    .search-box input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Form Mobile */
    .form-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .form-hint {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .form-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .char-counter {
        text-align: center;
    }
    
    .btn-primary {
        width: 100%;
    }
    
    /* Note Actions - jedna linia na mobile */
    .note-actions {
        flex-direction: row;
        flex-wrap: nowrap !important;
        gap: 0.3rem;
        overflow-x: auto;
    }
    
    .checkbox-container {
        width: auto;
        justify-content: center;
        order: 0;
    }
    
    .note-actions button {
        width: auto;
        padding: 0.4rem;
        justify-content: center;
        min-width: 36px;
        min-height: 36px;
        flex-shrink: 0;
    }
    
    .note-actions .btn-text {
        display: none;
    }
    
    /* Login Mobile */
    .login-container {
        margin: 0.5rem;
        border-radius: var(--radius-md);
    }
    
    .login-header {
        padding: 2rem 1.5rem 1.25rem;
    }
    
    .login-icon {
        font-size: 3rem;
    }
    
    #loginForm {
        padding: 1.5rem;
    }
    
    .login-footer {
        padding: 1rem 1.5rem;
        font-size: 0.85rem;
    }
    
    /* Quick Tips Mobile */
    .quick-tips {
        padding: 1.5rem 1rem;
        margin-top: 2rem;
    }
    
    .quick-tips h3 {
        font-size: 1.25rem;
    }
    
    .tip-item {
        padding: 1.25rem;
    }
    
    /* Note Cards Mobile */
    .note-card {
        padding: 1.5rem;
    }
    
    .note-content {
        font-size: 1rem;
        max-height: 200px;
    }
}

/* ============================================
   SELECTION MODE - Multi-select
   ============================================ */
.selection-bar {
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.3s ease-out;
}

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

.selection-info {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.selection-info span {
    color: var(--accent-primary);
    font-size: 1.25rem;
}

.selection-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.625rem 1rem !important;
    font-size: 0.875rem !important;
}

.btn-delete-selected {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-bounce);
    box-shadow: 0 4px 15px var(--error-glow);
}

.btn-delete-selected:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* Custom Checkbox w note-actions - mini wersja */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    padding: 0;
    border-radius: 8px;
    background: transparent;
    border: transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

@media (hover: hover) {
    .checkbox-container:hover .checkbox-custom {
        border-color: var(--accent-primary);
        box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
        transform: scale(1.1);
    }
}

.note-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(99, 102, 241, 0.4);
    border-radius: 5px;
    background: rgba(99, 102, 241, 0.08);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    flex-shrink: 0;
}

.checkbox-custom::after {
    content: '✔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 12px;
    font-weight: bold;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.note-checkbox:checked + .checkbox-custom {
    background: var(--gradient-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.4);
}

.note-checkbox:checked + .checkbox-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.checkbox-label {
    display: none;
}

/* Animacja przy zaznaczeniu */
.note-checkbox:checked + .checkbox-custom {
    animation: checkboxPulse 0.4s ease;
}

@keyframes checkboxPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.note-card.selected {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3), var(--shadow-md);
}

@media (max-width: 768px) {
    .selection-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .selection-actions {
        flex-direction: column;
    }
    
    .selection-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Ultra Small Mobile Typography */
    .hero-section h2 {
        font-size: 1.85rem;
        letter-spacing: -0.5px;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .admin-header h2 {
        font-size: 1.5rem;
    }
    
    /* Container Padding */
    .container {
        padding: 0 0.875rem;
    }
    
    /* Header Ultra Compact */
    header {
        padding: 0.875rem 0;
    }
    
    /* Navigation Ultra Small */
    nav button,
    nav a {
        padding: 0.75rem;
        min-width: 48px;
        min-height: 48px;
    }
    
    nav button .icon,
    nav a .icon {
        font-size: 1.35rem;
    }
    
    /* Stats Ultra Compact */
    .stat-item {
        padding: 0.75rem 1.25rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Forms Ultra Compact */
    .form-header,
    .form-footer {
        padding: 1rem 1.25rem;
    }
    
    .note-form textarea {
        padding: 1.25rem;
        font-size: 0.95rem;
        min-height: 150px;
    }
    
    .form-title {
        font-size: 0.9rem;
    }
    
    /* Login Ultra Compact */
    .login-container {
        margin: 0.25rem;
        border-radius: var(--radius-sm);
    }
    
    .login-header {
        padding: 1.75rem 1.25rem 1rem;
    }
    
    .login-icon {
        font-size: 2.5rem;
    }
    
    #loginForm {
        padding: 1.25rem;
    }
    
    .login-footer {
        padding: 0.875rem 1.25rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group input {
        padding: 0.875rem;
        font-size: 16px; /* Prevent zoom */
    }
    
    .checkbox-label {
        padding: 0.875rem;
    }
    
    .checkbox-text strong {
        font-size: 0.9rem;
    }
    
    .checkbox-text small {
        font-size: 0.75rem;
    }
    
    /* Note Actions Ultra Compact */
    .note-actions button {
        padding: 0.5rem;
        font-size: 1rem;
        min-width: 38px;
        min-height: 38px;
    }
    
    .note-card {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }
    
    .note-content {
        font-size: 0.95rem;
        max-height: 180px;
    }
    
    /* Modal Full Screen on Small Devices */
    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1.25rem;
    }
    
    /* Quick Tips Ultra Compact */
    .quick-tips {
        padding: 1.25rem 0.875rem;
        margin-top: 1.5rem;
    }
    
    .quick-tips h3 {
        font-size: 1.1rem;
    }
    
    .tip-item {
        padding: 1rem;
    }
    
    .tip-key {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .tip-desc {
        font-size: 0.8rem;
    }
    
    /* Hero Badge Small */
    .hero-badge {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .badge-icon {
        font-size: 1rem;
    }
    
    /* Buttons Full Width on Ultra Small */
    button,
    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}
