:root {
    --primary: #ffc107;
    --primary-light: #ffe082;
    --primary-dark: #ffa000;
    --gray: #7f8c8d;
    --gray-light: #fffaf4;
    --light: #fffaf4;
    --border: #ffe0b2;
    --radius: 8px;
    --success: #ffa000;
    --danger: #ff4444;
    --shadow: 0 4px 14px rgba(255, 152, 0, 0.1);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", sans-serif;
}

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

body {
    font-family: var(--font);
    padding: 2rem;
    background: var(--light);
    color: #333;
    line-height: 1.6;
    letter-spacing: 0.015em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--primary-dark);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-light) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo {
    width: 40px;
    height: 40px;
    vertical-align: middle;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card:hover::before {
    opacity: 1;
}

h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111;
    position: relative;
    display: inline-block;
}

h2::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 2rem;
    height: 2px;
    background: var(--primary);
    transition: width 0.2s ease;
}

.card:hover h2::after {
    width: 100%;
}

.counter {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    padding: 1.5rem;
    background: var(--gray-light);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.counter::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    pointer-events: none;
}

.counter span {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 3rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.form-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--gray-light);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
    background: white;
}

input::placeholder {
    color: #999;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font);
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 60%
    );
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: var(--primary-dark);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

button:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.success {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--success);
    color: white;
    border-radius: var(--radius);
    text-align: center;
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.success::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    pointer-events: none;
}

.items {
    list-style: none;
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.items li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--gray-light);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.items li::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.items li:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: white;
}

.items li:hover::after {
    opacity: 1;
}

.items button.remove {
    background: transparent;
    color: var(--danger);
    padding: 0.5rem;
    font-size: 1rem;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.items li:hover button.remove {
    opacity: 1;
}

.items button.remove:hover {
    background: var(--danger);
    color: white;
    transform: none;
    box-shadow: none;
}

.features {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.75rem;
    background: var(--gray-light);
    border-radius: var(--radius);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.features li::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.features li:hover {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: translateX(4px);
}

.features li:hover::after {
    opacity: 1;
}

footer {
    text-align: center;
    margin-top: 4rem;
    padding-bottom: 2rem;
    color: var(--gray);
}

footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--gray-light);
    position: relative;
    overflow: hidden;
}

footer a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

footer a:hover {
    background: rgba(255, 152, 0, 0.1);
    transform: translateY(-1px);
}

footer a:hover::after {
    opacity: 1;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.15rem;
    }

    .counter {
        flex-direction: column;
    }

    .form-group {
        flex-direction: column;
    }

    .items li {
        padding: 0.75rem;
    }

    .items button.remove {
        opacity: 1;
        padding: 0.4rem;
    }

    .features {
        gap: 0.5rem;
    }

    .features li {
        padding: 0.5rem;
    }
}
