:root {
    --primary: #25D366; /* WhatsApp Green */
    --bg: #121212;
    --card-bg: #1e1e1e;
    --text: #e0e0e0;
    --accent: #bb86fc;
    --danger: #cf6679;
}

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    padding: 20px;
    margin: 0;
}

.container {
    width: 100%;
    max-width: 450px;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-top: 20px;
}

h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
}

input[type="text"] {
    flex-grow: 1;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #333;
    background: #2a2a2a;
    color: white;
    outline: none;
    font-size: 1rem;
}

button {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.1s, opacity 0.2s;
}

button:active { transform: scale(0.95); }

#add-btn { background-color: var(--accent); color: #000; }

#share-btn { 
    background-color: var(--primary); 
    color: white; 
    width: 100%; 
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.clear-btn {
    background: transparent;
    color: var(--danger);
    width: 100%;
    margin-top: 10px;
    font-size: 0.9rem;
    text-decoration: underline;
}

ul { list-style: none; padding: 0; }

li {
    display: flex;
    align-items: center;
    padding: 14px;
    background: #2a2a2a;
    margin-bottom: 10px;
    border-radius: 12px;
    border-left: 4px solid var(--accent);
    transition: all 0.3s ease;
}

li.is-checked {
    border-left: 4px solid #444;
    opacity: 0.6;
}

.item-text {
    flex-grow: 1;
    margin-left: 12px;
    cursor: pointer;
    font-size: 1.1rem;
}

.item-text.checked-text {
    text-decoration: line-through;
}

.delete-btn {
    background: transparent;
    color: var(--danger);
    font-size: 1.5rem;
    padding: 0 5px;
}

.checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Add a handle icon or cursor hint */
li {
    cursor: grab;
    touch-action: manipulation; /* Improves mobile dragging */
}

li:active {
    cursor: grabbing;
    background: #333;
}

/* This is the ghost style while dragging */
.sortable-ghost {
    opacity: 0.3;
    background: var(--accent);
}

/* Prevents text selection while dragging on mobile */
body {
    -webkit-user-select: none;
    user-select: none;
    /* This makes the app feel more like a native app */
    -webkit-tap-highlight-color: transparent;
}

/* Allow text selection only in the input box */
input {
    -webkit-user-select: text;
    user-select: text;
}