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

@font-face {
    font-family: 'Lazer';
    src: url('fonts/LazzerTRIAL-SemiBold.woff2') format('woff2'),
         url('fonts/LazzerTRIAL-SemiBold.woff') format('woff'),
         url('fonts/LazzerTRIAL-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Lazer', sans-serif;
    -webkit-font-smoothing: antialiased;
    font-weight: 600;
    font-size: 30px;
    line-height: 29px;
    background-color: #000000;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 40px;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 100%;
    max-width: none;
    min-width: 300px; /* Prevent breaking of "Just type" */
}

.todo-list {
    display: flex;
    flex-direction: column;
    
}

.todo-item {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 8px 8px 4px;
    cursor: text;
}

.todo-content {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.todo-item:hover .check-arrow {
    opacity: 1;
}

.todo-item.selected {
    background-color: rgba(255, 255, 255, 0.1) !important; /* Default: white on black background */
}

/* Only change to black highlight on non-black backgrounds */
body[style*="background-color: #FFFFFF"] .todo-item.selected,
body[style*="background-color: #0095FF"] .todo-item.selected,
body[style*="background-color: #FF6600"] .todo-item.selected,
body[style*="background-color: #DDFF00"] .todo-item.selected,
body[style*="background-color: #E2D9C4"] .todo-item.selected {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

.todo-item.dragging {
    opacity: 0.5;
}

.todo-item.drag-over {
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.check-arrow {
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .check-arrow {
        left: -16px;
    }
    .todo-list {
        margin-left: 10px;
        margin-top: 10px;
    }
}

.todo-item.completed .check-arrow {
    opacity: 1;
}

.todo-content {
    flex: 1;
    outline: none;
    border: none;
    background: transparent;
    color: #ffffff;
    font-family: 'Lazer', sans-serif;
    font-weight: 600;
    font-size: 30px;
    line-height: 29px;
    padding: 0;
    width: 100%;
    min-width: 0;
    position: relative;
}

.todo-content.has-placeholder,
.todo-item .todo-content.has-placeholder {
    color: rgba(255, 255, 255, 0.2);
}

body:not([style*="background-color: #000000"]) .todo-content.has-placeholder,
body:not([style*="background-color: #000000"]) .todo-item .todo-content.has-placeholder {
    color: rgba(0, 0, 0, 0.2);
}

.todo-item.completed .todo-content {
    flex: 0 0 auto;
    width: auto;
}

.todo-content:focus {
    outline: none;
}

.todo-item.completed .todo-content {
    opacity: 0.2;
    position: relative;
    display: inline-block;
    width: fit-content;
    max-width: 100%;
}

/* Custom strikethrough with thicker line - only through the text */
.todo-item.completed .todo-content::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    transform: translateY(-50%);
    box-sizing: border-box;
}

/* Section Title Styles */
.todo-item.section-title {
    margin-top: 200px;
}

.todo-item.section-title .todo-content {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.todo-item.section-title:first-child {
    margin-top: 0;
}

.todo-item.completed .check-arrow svg path {
    fill: rgba(255, 255, 255, 0.2);
}

.check-arrow svg {
    width: 16px;
    height: 16px;
}

.check-arrow svg path {
    fill: #ffffff;
}

.empty-line {
    min-height: 36px;
    padding: 4px 0;
    cursor: text;
    position: relative;
}

.empty-line-placeholder {
    color: rgba(255, 255, 255, 0.2);
    font-family: 'Lazer', sans-serif;
    font-weight: 600;
    font-size: 30px;
    line-height: 29px;
    pointer-events: none;
    position: absolute;
    left: 0;
    top: 4px;
}

@media (max-width: 768px) {
    .empty-line-placeholder {
        font-size: 24px;
        line-height: 24px;
    }
}

.empty-line.drag-over {
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

/* Subtle shake for moving/reordering (ANPASSBAR) - VERTICAL */
@keyframes shake-subtle {
    0%, 100% { transform: translateY(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateY(-2px); }
    20%, 40%, 60%, 80% { transform: translateY(2px); }
}

/* Strong shake for checking/unchecking (ANPASSBAR) */
@keyframes shake-strong {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

body.shake-subtle {
    animation: shake-subtle 0.25s;
}

body.shake-strong {
    animation: shake-strong 0.25s;
}

/* ANPASSBARE WERTE:
   - shake-subtle: translateX(-2px/2px) = Intensität, 0.25s = Dauer
   - shake-strong: translateX(-5px/5px) = Intensität, 0.4s = Dauer
*/

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 40px;
    width: 400px;
    position: relative;
}

.back-button {
    font-family: 'Lazer', sans-serif;
    font-size: 16px;
  font-weight: 400;
    color: rgba(255, 255, 255, 0.2);
    background: transparent;
    border: none;
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.2s;
    position: absolute;
    top: 40px;
    left: 40px;
}

.back-button:hover {
    color: #ffffff;
}

.login-title {
    font-family: 'Lazer', sans-serif;
    font-size: 30px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
}

.login-subtitle {
    font-family: 'Lazer', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.2);
    margin: 0;
}

.login-input {
    font-family: 'Lazer', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
}

.login-input:focus {
    border-color: rgba(255, 255, 255, 0.5);
}

.login-input {
    border-radius: 8px;
}

.login-button {
    font-family: 'Lazer', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    background-color: #ffffff;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    transition: opacity 0.2s;
    border-radius: 8px;
    width: 100%;
}

.login-button:hover:not(:disabled) {
    opacity: 0.8;
}

.login-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.login-button {
    border-radius: 8px;
}

.login-message {
    font-family: 'Lazer', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    min-height: 20px;
}

/* Stats Display - Bottom Right Corner */
.stats {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Lazer', sans-serif;
    font-size: 14px;
    z-index: 1000;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stats-label {
    color: rgba(255, 255, 255, 0.2);
}

.stats-today,
.stats-week,
.stats-ever {
    color: rgba(255, 255, 255, 0.2);
}

.stats-hover {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.stats:hover .stats-hover {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Menu */
.menu {
    position: fixed;
    top: 40px;
    right: 40px;
    font-family: 'Lazer', sans-serif;
    font-size: 14px;
    z-index: 2000;
    cursor: pointer;
    outline: none;
}

.menu-label {
    color: rgba(255, 255, 255, 0.2);
    transition: opacity 0.2s;
}

.menu:hover .menu-label {
    opacity: 0.5;
}

.save-button {
    position: fixed;
    top: 40px;
    right: 100px; /* Left of menu */
    font-family: 'Lazer', sans-serif;
    font-size: 14px; /* Same as menu */
    color: rgba(255, 255, 255, 0.2);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    z-index: 2000;
    padding: 0;
}

.save-button:hover {
    opacity: 0.5;
}

.save-button:disabled {
    opacity: 0.1;
    cursor: not-allowed;
}

.last-load-indicator {
    position: fixed;
    top: 40px;
    right: 160px; /* Left of save button (save is at right: 100px, save width ~60px) */
    font-family: 'Lazer', sans-serif;
    font-size: 14px; /* Same as menu */
    color: rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    z-index: 2000;
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.menu-items {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0;
    padding-top: 8px;
    background-color: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
    border-radius: 8px;
}

.menu-item {
    font-family: 'Lazer', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: transparent;
    border: none;
    padding: 8px 12px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-colors {
    display: flex;
    gap: 8px;
    padding: 8px;
    flex-wrap: nowrap;
}

.color-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.color-circle:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.color-circle.active {
    border-color: #ffffff;
}

/* Onboarding Overlay */
.onboarding-overlay {
    position: fixed;
    top: 40px;
    right: 40px;
    background-color: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 16px 20px;
    max-width: 300px;
    z-index: 3000;
    animation: slideIn 0.3s ease-out;
    border-radius: 8px;
}

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

.onboarding-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.shortcut-symbol {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 4px 6px;
    border-radius: 8px;
    font-family: 'Lazer', sans-serif;
    font-size: 22px;
    font-weight: 600;
    white-space: nowrap;
}

.onboarding-text {
    flex: 1;
}

.onboarding-content p {
    font-family: 'Lazer', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.signin-link {
    font-family: 'Lazer', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: underline;
    cursor: pointer;
    display: inline-block;
}

.signin-link:hover {
    opacity: 0.8;
}

.onboarding-close {
    font-family: 'Lazer', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s;
}

.onboarding-close:hover {
    color: #ffffff;
}

/* Shortcuts Overlay */
.shortcuts-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.shortcuts-content {
    background-color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 8px;
}

.shortcuts-content h2 {
    font-family: 'Lazer', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 24px 0;
}

.shortcuts-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.shortcuts-content li {
    font-family: 'Lazer', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.5;
}

.shortcuts-content .shortcut-key {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 4px 6px;
    border-radius: 8px;
    font-family: 'Lazer', sans-serif;
    font-size: 14px;
    font-weight: 400;
    margin: 0 2px;
    line-height: 1.2;
    vertical-align: top;
    transform: translateY(-2px);
}

.shortcuts-close {
    font-family: 'Lazer', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    background-color: #ffffff;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    transition: opacity 0.2s;
    border-radius: 8px;
}

.shortcuts-close:hover {
    opacity: 0.8;
}

/* Mobile Styles */
@media (max-width: 768px) {
    body {
        font-size: 24px;
        line-height: 24px;
        padding: 20px;
    }
    
    .todo-content {
        font-size: 24px;
        line-height: 24px;
    }
    
    .empty-line-placeholder {
        font-size: 24px;
        line-height: 24px;
    }
    
    .menu {
        top: auto;
        bottom: 50px; /* Above stats (stats is at bottom: 20px, stats height ~40px, so 20 + 40 = 60, add 20px gap = 80px) */
        right: 20px;
    }
    
    .menu-items {
        top: auto;
        bottom: 100%;
        margin-top: 0;
        margin-bottom: 8px; /* Gap between menu label and items */
        padding-top: 8px;
        padding-bottom: 0;
    }
    
    /* Hide Shortcuts button on mobile */
    .menu-item:nth-child(3) {
        display: none;
    }
    
    .save-button {
        top: auto;
        bottom: 80px; /* Above menu (menu is at bottom: 50px, menu height ~30px) */
        right: 20px; /* Same as menu */
        font-size: 14px; /* Same as menu */
    }
    
    .last-load-indicator {
        top: auto;
        bottom: 110px; /* Above save button (save is at bottom: 80px, save height ~14px) */
        right: 20px; /* Same as menu */
        font-size: 14px; /* Same as menu */
    }
    
    .stats {
        bottom: 20px;
        right: 20px;
    }
    
    .onboarding-overlay {
        top: 20px;
        right: 20px;
        max-width: calc(100% - 40px);
    }
    
    /* Hide all onboarding hints on mobile */
    .onboarding-task {
        display: none !important;
    }
}

/* Onboarding Task Styles */
.onboarding-task {
    opacity: 0.6;
    pointer-events: none;
}

.onboarding-task .todo-content {
    pointer-events: auto;
    cursor: default;
    font-size: 14px;
    font-weight: 400;
}

.onboarding-task .todo-content .shortcut-key {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 8px;
    border-radius: 8px;
    font-family: 'Lazer', sans-serif;
    font-size: 14px;
    font-weight: 400;
    margin: 0 2px;
    line-height: 1.2;
    vertical-align: top;
    transform: translateY(-4px);
}

.signin-link-inline {
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    pointer-events: auto;
}

.signin-link-inline:hover {
    opacity: 0.8;
}

