body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #181818;
    color: white;
}

.grid {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    gap: 20px;
}

/* Base card style */
.timer-card, .add-card {
    width: 220px;
    height: 160px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    position: relative;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.timer-card:hover, .add-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

/* Add card style */
.add-card {
    font-size: 48px;
    background: #444;
    cursor: pointer;
    color: #ccc;
}

/* Colorful card variants */
.timer-card[data-id]:nth-of-type(4n+1) { background: linear-gradient(145deg, #6a11cb, #2575fc); }
.timer-card[data-id]:nth-of-type(4n+2) { background: linear-gradient(145deg, #ff6a00, #ee0979); }
.timer-card[data-id]:nth-of-type(4n+3) { background: linear-gradient(145deg, #00c6ff, #0072ff); }
.timer-card[data-id]:nth-of-type(4n)   { background: linear-gradient(145deg, #f7971e, #ffd200); }

/* Timer content layout */
.timer-card strong {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #fff;
    text-shadow: 1px 1px 3px #000;
}

.timer-card div:nth-of-type(2) {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 1px 1px 3px #000;
}

/* Button styles */
.timer-card button {
    margin: 0 4px;
    padding: 4px 10px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    color: #333;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    transition: background 0.2s ease;
}

.timer-card button:hover {
    background: #ddd;
}

/* Input fields in new card */
.inline-name, .inline-duration {
    width: 80%;
    padding: 8px;
    font-size: 16px;
    margin: 4px 0;
    border: none;
    border-radius: 8px;
    text-align: center;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
    background: #eee;
    color: #222;
}

.duration-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 4px 0;
}

.inline-min, .inline-sec {
    width: 70px;
    padding: 6px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    text-align: center;
    background: #eee;
    color: #222;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}
.app-header {
    width: 100%;
    padding: 20px 0 10px;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    color: white;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-header h1 {
    margin: 0;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.subtitle {
    margin-top: 6px;
    font-size: 16px;
    color: #e0e0e0;
    font-weight: 300;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    justify-content: center;
}

.action-buttons button {
    margin: 0; /* override card button styles */
}

@keyframes wiggle {
    0% { transform: rotate(0deg); }
    15% { transform: rotate(-3deg); }
    30% { transform: rotate(3deg); }
    45% { transform: rotate(-3deg); }
    60% { transform: rotate(3deg); }
    75% { transform: rotate(-3deg); }
    100% { transform: rotate(0deg); }
}

.wiggle {
    animation: wiggle 0.6s ease-in-out infinite;
}