    * { box-sizing: border-box; }
    html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow-x: hidden; overflow-y: auto; }
    body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; display: flex; flex-direction: column; }
    .header { background: #3880ff; color: white; padding: 12px 16px; display: flex; gap: 12px; align-items: center; width: 100%; flex-shrink: 0; position: relative; z-index: 100; }
    .header h1 { margin: 0; font-size: 20px; flex: 1; }
    .header button { background: none; border: none; color: white; font-size: 24px; cursor: pointer; padding: 8px; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; touch-action: manipulation; border-radius: 4px; }
    .page { padding: 16px; max-width: 800px; margin: 0 auto; width: 100%; flex: 1; overflow-y: auto; }
    .input-group { display: flex; gap: 8px; margin-bottom: 16px; }
    .input-group input { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 16px; }
    .input-group button { padding: 10px 20px; background: #3880ff; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; }
    .todo-list { border: 1px solid #e0e0e0; border-radius: 4px; overflow: hidden; }
    .todo-item { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid #e0e0e0; gap: 12px; }
    .todo-item:last-child { border-bottom: none; }
    .todo-item button { background: none; border: none; cursor: pointer; padding: 8px; font-size: 20px; }
    .todo-text { flex: 1; }
    .todo-title { margin: 0; font-size: 16px; color: #000; font-weight: 500; }
    .todo-title.done { text-decoration: line-through; opacity: 0.45; }
    .todo-subtitle { margin: 4px 0 0; font-size: 12px; color: #666; }
    .delete-btn { color: #f44336; }
    .empty { text-align: center; padding: 40px 16px; color: #999; }
    .about-section { margin: 20px 0; }
    .about-section h3 { margin-top: 0; }
    .stat-item { display: flex; justify-content: space-between; padding: 12px; border: 1px solid #e0e0e0; border-radius: 4px; margin: 8px 0; }
    .badge { padding: 4px 12px; border-radius: 4px; font-size: 12px; font-weight: 600; color: white; }
    .badge-primary { background: #2196f3; }
    .badge-success { background: #4caf50; }
    .badge-warning { background: #ff9800; }
    .status-online { color: #4caf50; }
    .status-offline { color: #f44336; }
    .sync-button { width: 100%; padding: 12px; background: #ff9800; color: white; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; margin-bottom: 16px; font-weight: 600; transition: all 0.3s ease; }
    .sync-button:hover { background: #f57c00; }
    .sync-button:active { transform: scale(0.98); }
    .sync-button.syncing { background: #9ccc65; cursor: not-allowed; opacity: 0.8; }
    .hidden { display: none; }
    @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

    /* Modal Styles */
    .modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 9999; align-items: flex-end; justify-content: center; }
    .modal-overlay.active { display: flex; }
    .modal-box { background: white; width: 100%; max-width: 100%; border-radius: 16px 16px 0 0; padding: 24px 16px 40px; max-height: 90vh; overflow-y: auto; animation: slideUp 0.3s ease-out; }
    @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
    @keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
    .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
    .modal-header h3 { margin: 0; font-size: 18px; }
    .modal-header button { background: none; border: none; font-size: 24px; cursor: pointer; color: #666; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; margin-right: -8px; }
    .modal-form { display: flex; flex-direction: column; gap: 16px; }
    .modal-form-group { display: flex; flex-direction: column; gap: 8px; }
    .modal-form-group label { font-size: 14px; font-weight: 600; color: #333; }
    .modal-form-group input { padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 16px; min-height: 44px; }
    .modal-form-group input[type="text"], .modal-form-group input[type="datetime-local"] { width: 100%; }
    .modal-status-toggle { display: flex; align-items: center; gap: 12px; padding: 12px; background: #f5f5f5; border-radius: 4px; min-height: 44px; }
    .modal-status-toggle button { background: none; border: none; font-size: 24px; cursor: pointer; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
    .modal-status-toggle span { font-size: 14px; color: #666; flex: 1; }
    .modal-notification-info { font-size: 12px; color: #999; margin-top: 4px; padding: 8px 0; line-height: 1.4; }
    .modal-cancel-notification { color: #2196f3; cursor: pointer; text-decoration: underline; font-size: 14px; padding: 12px 0; min-height: 44px; display: flex; align-items: center; }
    body.dark-mode #modal-notify-time { background: #2a2a2a !important; color: #e0e0e0 !important; }
    .modal-actions { display: flex; gap: 8px; margin-top: 20px; flex-direction: column; }
    .modal-actions button { flex: 1; padding: 16px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; min-height: 44px; }
    .modal-delete-btn { background: #f44336; color: white; width: 100%; margin-top: 16px; padding: 16px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; min-height: 44px; }
    .modal-delete-btn:hover { background: #d32f2f; }
    .modal-save-btn { background: #2196f3; color: white; }
    .modal-save-btn:hover { background: #1976d2; }
    .modal-close-btn { background: #e0e0e0; color: #333; }
    .modal-close-btn:hover { background: #d0d0d0; }

    /* Dark Mode Modal Styles */
    body.dark-mode .modal-box { background: #2a2a2a !important; color: #e0e0e0 !important; }
    body.dark-mode .modal-header button { color: #999 !important; }
    body.dark-mode .modal-form-group label { color: #e0e0e0 !important; }
    body.dark-mode .modal-form-group input { background: #1e1e1e !important; color: #e0e0e0 !important; border-color: #444 !important; }
    body.dark-mode .modal-status-toggle { background: #1e1e1e !important; }
    body.dark-mode .modal-status-toggle span { color: #999 !important; }
    body.dark-mode .modal-notification-info { color: #666 !important; }

    /* Search Modal Styles */
    body.dark-mode #search-modal .modal-box { background: #2a2a2a !important; color: #e0e0e0 !important; }
    body.dark-mode #search-input { background: #1e1e1e !important; color: #e0e0e0 !important; border-color: #444 !important; }
    body.dark-mode #search-input::placeholder { color: #666 !important; }
    body.dark-mode #search-results > div { border-color: #444 !important; }
    body.dark-mode #search-results div[style*="color: #000"] { color: #e0e0e0 !important; }

    /* Mobile Touch Optimization */
    @media (max-width: 768px) {
        /* Search modal opens from top on mobile to avoid keyboard coverage */
        #search-modal.active { display: flex !important; align-items: flex-start !important; padding-top: 20px; }
        #search-modal .modal-box { border-radius: 0 0 16px 16px; animation: slideDown 0.3s ease-out !important; max-height: 80vh; }

        .modal-header h3 { font-size: 16px; }
        .modal-form-group { gap: 10px; }
        .modal-form-group label { font-size: 13px; font-weight: 700; }
        .modal-form-group input { padding: 14px; font-size: 16px; min-height: 48px; }
        .modal-notification-info { font-size: 11px; margin-top: 6px; }
        .modal-cancel-notification { font-size: 13px; padding: 10px 0; }
        .modal-actions { flex-direction: column; gap: 10px; }
        .modal-actions button { padding: 14px; font-size: 15px; min-height: 48px; touch-action: manipulation; }
        .modal-delete-btn { padding: 14px; font-size: 15px; min-height: 48px; }
        button { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
        .about-section button { min-height: 48px; padding: 14px 10px; font-size: 15px; touch-action: manipulation; }
        .account-card button { min-height: 48px; padding: 14px 10px; font-size: 15px; touch-action: manipulation; }
        textarea, input[type="text"], input[type="email"], input[type="password"], input[type="datetime-local"], input[type="file"], select { font-size: 16px; }
    }

    /* Dark Mode Select Styles */
    body.dark-mode select { background: #1e1e1e !important; color: #e0e0e0 !important; border-color: #444 !important; }
    body.dark-mode #custom-sound-section { background: #1e1e1e !important; }
    body.dark-mode #custom-sound-input { background: #2a2a2a !important; color: #e0e0e0 !important; border-color: #444 !important; }
    body.dark-mode #custom-sound-name { color: #999 !important; }

    /* Dark Mode Admin Dashboard */
    body.dark-mode #admin-page table { background: #1e1e1e !important; }
    body.dark-mode #admin-page thead { background: #2a2a2a !important; }
    body.dark-mode #admin-page th { color: #e0e0e0 !important; }
    body.dark-mode #admin-page td { color: #e0e0e0 !important; border-color: #444 !important; }
    body.dark-mode #admin-page button { background: #f44336 !important; color: white !important; }

    /* Dark Mode Styles */
    body.dark-mode { background: #1e1e1e !important; color: #e0e0e0 !important; }
    body.dark-mode .header { background: #1a1a1a !important; }
    body.dark-mode .page { background: #1e1e1e !important; color: #e0e0e0 !important; }
    body.dark-mode .input-group input { background: #2a2a2a !important; color: #e0e0e0 !important; border-color: #444 !important; }
    body.dark-mode .todo-list { background: #2a2a2a !important; border-color: #444 !important; }
    body.dark-mode .todo-item { background: #2a2a2a !important; border-bottom-color: #444 !important; }
    body.dark-mode .todo-title { color: #e0e0e0 !important; }
    body.dark-mode .todo-subtitle { color: #999 !important; }
    body.dark-mode .empty { color: #666 !important; }
    body.dark-mode .stat-item { background: #2a2a2a !important; border-color: #444 !important; }
    body.dark-mode #menu { background: #2a2a2a !important; border-right-color: #444 !important; color: #e0e0e0 !important; }
    body.dark-mode #menu button { background: #3a3a3a !important; color: #e0e0e0 !important; }
    body.dark-mode #menu button:hover { background: #4a4a4a !important; }
    body.dark-mode .about-section h3 { color: #e0e0e0 !important; }
    body.dark-mode .about-section small { color: #999 !important; }
    body.dark-mode #pull-refresh-indicator { background: #1a1a1a !important; color: #e0e0e0 !important; }

    /* Account Card */
    .account-card { padding: 12px; border: 1px solid #e0e0e0; border-radius: 4px; margin: 8px 0; background: #f9f9f9; }
    .account-value { color: #666; margin-top: 4px; }
    body.dark-mode .account-card { background: #2a2a2a !important; border-color: #444 !important; }
    body.dark-mode .account-value { color: #e0e0e0 !important; }
    body.dark-mode #profile-tag-input,
    body.dark-mode #profile-first-name-input,
    body.dark-mode #profile-last-name-input { background: #2a2a2a !important; color: #e0e0e0 !important; border-color: #444 !important; }
    body.dark-mode #profile-tag-input::placeholder,
    body.dark-mode #profile-first-name-input::placeholder,
    body.dark-mode #profile-last-name-input::placeholder { color: #999 !important; }

    /* Profile Page Dark Mode */
    body.dark-mode #profile-header { background: #2a2a2a !important; border-color: #444 !important; }
    body.dark-mode #profile-display-name { color: #e0e0e0 !important; }
    body.dark-mode #profile-display-tag { color: #999 !important; }
    body.dark-mode #profile-display-info { color: #666 !important; }
    body.dark-mode #profile-page textarea { background: #2a2a2a !important; color: #e0e0e0 !important; border-color: #444 !important; }
    body.dark-mode #profile-page textarea::placeholder { color: #999 !important; }
    body.dark-mode #posts-feed > div { background: #2a2a2a !important; border-color: #444 !important; color: #e0e0e0 !important; }
    body.dark-mode #posts-feed div { color: #e0e0e0 !important; }
    body.dark-mode #posts-feed div[style*="color: #999"] { color: #999 !important; }
    body.dark-mode #posts-feed div[style*="color: #333"] { color: #e0e0e0 !important; }

    /* Reaction Buttons Dark Mode */
    body.dark-mode [id^="like-btn-"] { color: #64b5f6 !important; }
    body.dark-mode [id^="dislike-btn-"] { color: #ef5350 !important; }
    body.dark-mode [id^="like-btn-"][style*="background: none"] { color: #64b5f6 !important; }
    body.dark-mode [id^="dislike-btn-"][style*="background: none"] { color: #ef5350 !important; }
