:root {
    --primary-color: #ff6b81;
    --secondary-color: #ffe0e6;
    --text-color: #333;
    --bg-color: #fff0f3;
    --card-bg: #ffffff;
    --shadow: 0 4px 15px rgba(255, 107, 129, 0.2);
}

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

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    padding: 2rem 1rem;
    text-align: center;
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.header-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.progress-container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255,255,255,0.3);
    padding: 10px 20px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.progress-text {
    font-weight: bold;
    margin-bottom: 5px;
}

.progress-bar {
    height: 10px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #ff4757;
    width: 0%;
    transition: width 0.5s ease-in-out;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 107, 129, 0.3);
    border-color: var(--secondary-color);
}

.card.completed {
    background: linear-gradient(to bottom right, #ffffff, #fff0f3);
    border: 2px solid var(--primary-color);
}

.card.completed::before {
    content: '❤️';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
}

.card-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
    position: absolute;
    bottom: -10px;
    right: 10px;
    opacity: 0.5;
    z-index: 0;
}

.card-content {
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #444;
}

.card-date {
    font-size: 0.9rem;
    color: #888;
    margin-top: 0.5rem;
    display: block;
}

.card-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
    background: #f9f9f9;
    padding: 5px;
    border-radius: 5px;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-size: 0.9rem;
}

/* Modal */
.hidden {
    display: none !important;
}

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

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 5px 30px rgba(0,0,0,0.2);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.close-btn:hover {
    color: #333;
}

.modal h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.date-input, .note-input {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="date"], textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

textarea {
    height: 100px;
    resize: vertical;
}

button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: #ff4757;
}