:root {
    --primary-color: #ff69b4;
    --secondary-color: #ff8da1;
    --accent-color: #ffd1dc;
    --success-color: #4ade80;
    --text-color: #333;
    --light-text: #666;
    --card-bg: #fff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition-time: 0.3s;
}

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

body {
    font-family: 'Noto Serif SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
}

.stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, white, transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 230px 80px, white, transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 350px 200px, white, transparent),
        radial-gradient(2px 2px at 420px 50px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 500px 180px, white, transparent),
        radial-gradient(2px 2px at 580px 100px, rgba(255,255,255,0.9), transparent);
    background-size: 600px 250px;
    animation: twinkle 8s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 1rem;
    text-align: center;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all var(--transition-time) ease;
}

nav a:hover {
    background: rgba(255, 105, 180, 0.2);
    color: var(--primary-color);
}

nav a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.wish-container {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    padding: 120px 20px 50px;
}

.wish-header {
    text-align: center;
    margin-bottom: 2rem;
}

.wish-header h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    background: linear-gradient(135deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.wish-header p {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.wish-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    text-align: center;
    min-width: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.stat-item.completed .stat-number {
    color: var(--success-color);
}

.stat-item.remaining .stat-number {
    color: var(--accent-color);
}

.wish-input-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.input-wrapper {
    display: flex;
    gap: 0.8rem;
}

.input-wrapper input {
    flex: 1;
    padding: 1rem 1.2rem;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-time) ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.2);
}

.add-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-time) ease;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.add-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

.add-btn:active {
    transform: translateY(0) scale(1);
}

.add-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
    color: white;
}

.loading-indicator .pulse {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.wishes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wish-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.2rem 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s ease-out;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition-time) ease;
}

.wish-card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.wish-card.completed {
    background: rgba(255, 255, 255, 0.85);
}

.wish-card.completed .wish-text {
    text-decoration: line-through;
    color: var(--light-text);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

.wish-checkbox {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-time) ease;
    flex-shrink: 0;
}

.wish-checkbox:hover {
    background: rgba(255, 105, 180, 0.2);
}

.wish-card.completed .wish-checkbox {
    background: var(--success-color);
    border-color: var(--success-color);
}

.wish-checkbox i {
    color: white;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity var(--transition-time) ease;
}

.wish-card.completed .wish-checkbox i {
    opacity: 1;
}

.wish-text {
    flex: 1;
    font-size: 1rem;
    color: var(--text-color);
    word-break: break-word;
}

.wish-delete {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all var(--transition-time) ease;
    opacity: 0;
}

.wish-card:hover .wish-delete {
    opacity: 1;
}

.wish-delete:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
}

.error-state {
    text-align: center;
    padding: 2rem;
    background: rgba(231, 76, 60, 0.2);
    border-radius: 15px;
    color: #ff6b6b;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.error-state button {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

@media (max-width: 480px) {
    nav ul {
        gap: 0.5rem;
    }

    nav a {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .wish-header h1 {
        font-size: 2.5rem;
    }

    .wish-container {
        padding: 100px 15px 30px;
    }

    .wish-stats {
        gap: 1rem;
    }

    .stat-item {
        padding: 0.8rem 1rem;
        min-width: 80px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .add-btn {
        width: 100%;
        height: 45px;
    }

    .wish-delete {
        opacity: 1;
    }
}