* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    /* Verhindert Double-Tap-Zoom auf der gesamten Seite */
    touch-action: manipulation;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header-main {
    text-align: center;
    flex: 1;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: #2c3e50;
}

header p {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.date-display {
    background: none;
    border: none;
    border-radius: 16px;
    padding: 12px 20px;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.date-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.date-nav-btn {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15) 0%, rgba(155, 89, 182, 0.15) 100%);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #3498db;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.date-nav-btn:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.25) 0%, rgba(155, 89, 182, 0.25) 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.date-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.date-info {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.current-date {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 600;
    min-width: 180px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.today-btn {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15) 0%, rgba(39, 174, 96, 0.15) 100%);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #27ae60;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.today-btn:hover {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.25) 0%, rgba(39, 174, 96, 0.25) 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
}

/* Authentication Styles */
.auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
}

.user-info:has(.user-avatar[style*="display: none"]) {
    padding: 8px 16px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #27ae60;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #27ae60;
    margin-bottom: 2px;
}

.user-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-settings {
    background: none;
    border: none;
    color: #7f8c8d;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-settings:hover {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.btn-logout {
    background: none;
    border: none;
    color: #7f8c8d;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.btn-logout:hover {
    color: #e74c3c;
}

.btn-login {
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.btn-login:hover {
    background: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.3);
}

.google-icon {
    font-size: 1.1rem;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-card h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.login-card p {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.btn-login-large {
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.btn-login-large:hover {
    background: #3367d6;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.4);
}

.google-logo {
    background: white;
    color: #4285f4;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-radius: 25px;
    background: #f1f3f4;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #5f6368;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: white !important;
    color: #1a73e8 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.auth-tab:hover:not(.active) {
    color: #1a73e8;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #5f6368;
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dadce0;
    margin: 0 15px;
}

/* Email Auth Form */
.email-auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dadce0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
}

.form-group input::placeholder {
    color: #9aa0a6;
}

.btn-email-auth {
    width: 100%;
    padding: 12px 24px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 15px;
}

.btn-email-auth:hover {
    background: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.3);
}

.btn-email-auth:disabled {
    background: #dadce0;
    color: #9aa0a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-error {
    background: #fce8e6;
    color: #d93025;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 10px;
    border: 1px solid #f1aeb5;
}

/* Forgot Password Styles */
.forgot-password-section {
    text-align: center;
    margin: 10px 0;
}

.forgot-password-link {
    background: none;
    border: none;
    color: #1a73e8;
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: #1557b0;
}

/* Password Reset Modal */
.password-reset-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.password-reset-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.btn-close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.2rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-content {
    padding: 24px;
}

.modal-content p {
    color: #5f6368;
    margin-bottom: 20px;
    line-height: 1.5;
}

.btn-reset-send {
    width: 100%;
    padding: 12px 24px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 15px;
}

.btn-reset-send:hover {
    background: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.3);
}

.btn-reset-send:disabled {
    background: #dadce0;
    color: #9aa0a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.reset-success {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid #c8e6c9;
    text-align: center;
}

.reset-error {
    background: #fce8e6;
    color: #d93025;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid #f1aeb5;
    text-align: center;
}

.login-benefits {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    color: #7f8c8d;
}

.benefit-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: var(--progress-height, 0%);
    width: 100%;
    background: var(--progress-color, transparent);
    transition: all 0.5s ease;
    z-index: 1;
    border-radius: 13px;
}

/* Hover-Effekte nur auf Geräten mit echter Hover-Unterstützung */
@media (hover: hover) {
    .metric-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }
}

.metric-card.status-good {
    border-color: #27ae60;
}

.metric-card.status-warning {
    border-color: #f39c12;
}

.metric-card.status-bad {
    border-color: #e74c3c;
}

.metric-header {
    position: relative;
    z-index: 2;
}

.metric-header h2 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: #2c3e50;
}

.metric-subtitle {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.metric-tabs {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    padding: 8px 15px;
    border: none;
    background: #ecf0f1;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    color: #7f8c8d;
}

.tab-btn.active {
    background: #3498db;
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #d5dbdb;
}

.metric-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.metric-display {
    margin-bottom: 20px;
}

.metric-value {
    font-size: 3rem;
    font-weight: bold;
    color: #2c3e50;
    display: inline-block;
    margin-right: 10px;
}

.metric-unit {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 500;
}

.metric-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-width: 50px;
    /* Verhindert Double-Tap-Zoom auf Buttons */
    touch-action: manipulation;
}

/* Metric button colors based on data-change values */
.metric-btn[data-change="-10"] {
    background: #e74c3c;
    color: white;
}

.metric-btn[data-change="-1"] {
    background: #ec7063;
    color: white;
}

.metric-btn[data-change="1"] {
    background: #58d68d;
    color: white;
}

.metric-btn[data-change="10"] {
    background: #27ae60;
    color: white;
}

@media (hover: hover) {
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
}

.btn:active {
    transform: translateY(0);
}

footer {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.sync-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #7f8c8d;
}

.sync-indicator {
    font-size: 1.2rem;
    animation: spin 2s linear infinite;
}

.sync-indicator.synced {
    animation: none;
    color: #27ae60;
}

.sync-indicator.error {
    animation: none;
    color: #e74c3c;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        margin-bottom: 15px;
        padding: 10px;
    }

    .header-top {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    .header-main {
        order: 1;
    }

    .auth-section {
        order: 2;
    }

    header h1 {
        font-size: 1.5rem;
        margin-bottom: 3px;
    }

    header p {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .dashboard {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .metric-card {
        padding: 20px;
    }

    .metric-value {
        font-size: 2.5rem;
    }

    .metric-controls {
        gap: 10px;
    }

/* === Bar Chart Styling === */
.metric-chart {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    height: 140px;
    position: relative;
}

.chart-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    justify-content: space-around !important;
    height: 60px !important;
    gap: 2px !important;
    padding: 10px !important;
    background: rgba(0, 0, 0, 0.1) !important;
    border-radius: 6px !important;
    border: 2px solid #ccc !important;
    width: 100% !important;
}

.chart-bar {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-end !important;
    height: 100% !important;
    position: relative !important;
    min-width: 15px !important;
    max-width: 25px !important;
}

.bar-label {
    font-size: 0.6rem !important;
    color: #666 !important;
    margin-bottom: 2px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    flex-shrink: 0 !important;
    order: 2 !important;
}

.bar-fill {
    width: 15px !important;
    background: #3498db !important;
    border-radius: 3px 3px 0 0 !important;
    min-height: 10px !important;
    height: 30% !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
    margin-top: auto !important;
    margin-bottom: 2px !important;
    order: 1 !important;
    display: block !important;
}

.bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* Status-specific bar colors */
.metric-card.status-good .bar-fill {
    background: linear-gradient(180deg, #27ae60 0%, #2ecc71 100%);
}

.metric-card.status-warning .bar-fill {
    background: linear-gradient(180deg, #f39c12 0%, #e67e22 100%);
}

.metric-card.status-bad .bar-fill {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
}

/* Responsive chart styling */
@media (max-width: 768px) {
    .metric-chart {
        height: 110px;
    }
}

    .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
        min-width: 55px;
    }

    .user-info {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }

    .user-details {
        align-items: center;
    }

    .login-card {
        padding: 30px 20px;
    }

    .date-display {
        padding: 4px 10px;
    }

    .date-navigation {
        gap: 8px;
    }

    .date-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .current-date {
        min-width: auto;
        font-size: 0.9rem;
    }
    
    .date-navigation {
        gap: 12px;
    }

    .user-info {
        padding: 4px 8px;
    }

    .user-avatar {
        width: 24px;
        height: 24px;
    }

    .btn-login {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .tab-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .metric-controls {
        gap: 5px;
    }

    .btn {
        font-size: 0.75rem;
        min-width: 40px;
    }
}

/* Settings Overlay Styles */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    /* Verhindert Modal-Abschneiden auf Mobile */
    padding: 20px;
    box-sizing: border-box;
}

.settings-container {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    
    /* Scrollbalken ausblenden */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.settings-container::-webkit-scrollbar {
    display: none; /* Safari und Chrome */
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.settings-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.settings-content {
    padding: 24px;
}

.settings-section {
    margin-bottom: 32px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 8px;
}

.settings-section p {
    color: #7f8c8d;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.habits-list {
    display: grid;
    gap: 12px;
}

.habit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.habit-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.habit-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.habit-emoji {
    font-size: 1.5rem;
}

.habit-details h4 {
    margin: 0 0 4px 0;
    color: #2c3e50;
    font-size: 1rem;
}

.habit-details p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.85rem;
}

.habit-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #27ae60;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.btn-delete {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

.habit-form {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.habit-form .form-group {
    margin-bottom: 16px;
}

.habit-form .form-group:last-child {
    margin-bottom: 0;
}

.habit-form .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.9rem;
}

.emoji-link {
    color: #3498db;
    text-decoration: none;
    font-size: 0.8rem;
    margin-left: 8px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.emoji-link:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #2980b9;
    transform: scale(1.1);
}

.habit-form .form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: white;
}

.habit-form .form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkmark {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Settings Mobile Responsive */
@media (max-width: 768px) {
    .settings-overlay {
        /* Radikale Mobile Fullscreen Lösung */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        /* Fallback für ältere Browser */
        height: 100dvh !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .settings-container {
        /* Modal = kompletter Screen ohne Ausnahme */
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        /* Scrollbar wieder aktivieren für Mobile */
        scrollbar-width: auto !important;
        -ms-overflow-style: auto !important;
    }
    
    /* Scrollbar für Mobile wieder sichtbar machen */
    .settings-container::-webkit-scrollbar {
        display: block !important;
        width: 8px !important;
    }
    
    .settings-container::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.1) !important;
    }
    
    .settings-container::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.3) !important;
        border-radius: 4px !important;
    }
    
    .settings-header {
        /* Header fest oben - nie abgeschnitten */
        position: relative !important;
        padding: 20px !important;
        flex-shrink: 0 !important;
        border-radius: 0 !important;
        min-height: auto !important;
    }
    
    .settings-content {
        /* Content nutzt restlichen Platz und scrollt */
        flex: 1 !important;
        overflow-y: auto !important;
        padding: 20px !important;
        /* Extra Scrollbar Styling für Mobile */
        -webkit-overflow-scrolling: touch;
    }
    
    .habit-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .habit-controls {
        align-self: flex-end;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
} 