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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#root {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    padding: 48px;
    max-width: 800px;
    width: 100%;
    animation: fadeIn 0.4s ease-out;
}

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

h1 {
    color: #2d3748;
    margin-bottom: 32px;
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.5px;
}

.counter {
    text-align: center;
}

.count-display {
    font-size: 5rem;
    color: #667eea;
    margin: 40px 0;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.count-display:hover {
    transform: scale(1.05);
}

.button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 130px;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

button.reset {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

button.reset:hover {
    box-shadow: 0 8px 20px rgba(245, 87, 108, 0.4);
}

/* Responsive design */
@media (max-width: 600px) {
    #root {
        padding: 32px 24px;
    }
    
    h1 {
        font-size: 1.75rem;
        margin-bottom: 24px;
    }
    
    .count-display {
        font-size: 4rem;
        margin: 32px 0;
    }
    
    button {
        padding: 12px 20px;
        font-size: 0.9rem;
        min-width: 110px;
    }
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    padding-bottom: 24px;
}

.subtitle {
    color: #718096;
    font-size: 1.1rem;
    margin-top: 8px;
    font-weight: 500;
}

/* Counter section */
.counter-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.counter-section h2 {
    color: #4a5568;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

/* Toggle section */
.toggle-section {
    text-align: center;
    margin: 32px 0;
}

.toggle-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    min-width: 280px;
    font-size: 1.05rem;
}

.toggle-btn:hover {
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.4);
}

/* Advanced section */
.advanced-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 32px;
    border-radius: 16px;
    margin: 32px 0;
    animation: slideIn 0.4s ease-out;
}

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

.advanced-section h2 {
    color: #4a5568;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.hint {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-style: italic;
}

/* Todo input */
.todo-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.todo-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.todo-input::placeholder {
    color: #a0aec0;
}

/* Filter tabs for routing */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: white;
    padding: 6px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-tab {
    flex: 1;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    color: #4a5568;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.filter-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Todo list */
.todo-list {
    list-style: none;
    margin: 20px 0;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: white;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.todo-item:hover {
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.todo-item.done {
    opacity: 0.6;
    background: #f7fafc;
}

.todo-item.done .todo-text {
    text-decoration: line-through;
    color: #a0aec0;
}

.todo-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 14px;
    cursor: pointer;
    accent-color: #667eea;
}

.todo-text {
    flex: 1;
    color: #2d3748;
    font-size: 1rem;
}

.delete-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-width: auto;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.delete-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.5);
}

/* Stats */
.stats {
    text-align: center;
    color: #718096;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 16px;
    background: white;
    border-radius: 10px;
    margin-top: 16px;
}

/* bindInput demo section */
.bind-input-demo {
    margin-top: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.bind-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.bind-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.bind-preview {
    margin-top: 20px;
    padding: 16px;
    background: white;
    border-radius: 10px;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.bind-preview strong {
    color: #4a5568;
    display: block;
    margin-bottom: 8px;
}

.bind-preview pre {
    color: #667eea;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    margin: 0;
    white-space: pre-wrap;
}

/* Footer feature list */
.feature-list {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid rgba(102, 126, 234, 0.1);
}

.feature-list h3 {
    color: #4a5568;
    font-size: 1.3rem;
    margin-bottom: 16px;
    text-align: center;
}

.feature-list ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.feature-list li {
    color: #2d3748;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.feature-list li:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    transform: translateX(4px);
}

.console-hint {
    text-align: center;
    color: #667eea;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 10px;
    animation: pulse 2s ease-in-out infinite;
}

/* Add subtle animation on load */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

/* Responsive design */
@media (max-width: 1024px) {
    #root {
        max-width: 700px;
        padding: 40px;
    }
}

@media (max-width: 768px) {
    #root {
        max-width: 600px;
        padding: 32px;
    }

    h1 {
        font-size: 2rem;
    }

    .count-display {
        font-size: 4rem;
    }

    .button-group {
        gap: 10px;
    }

    button {
        padding: 12px 24px;
        min-width: 120px;
    }
}

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

    #root {
        max-width: 100%;
        padding: 24px 20px;
    }

    h1 {
        font-size: 1.75rem;
        margin-bottom: 24px;
    }

    .count-display {
        font-size: 3.5rem;
        margin: 30px 0;
    }

    .button-group {
        flex-direction: column;
        align-items: center;
    }

    button {
        width: 100%;
        max-width: 280px;
        padding: 14px 20px;
        min-width: auto;
    }

    .toggle-btn {
        min-width: 100%;
        max-width: 320px;
    }

    .advanced-section {
        padding: 20px;
    }

    .feature-list ul {
        grid-template-columns: 1fr;
    }

    .filter-tabs {
        flex-direction: column;
        gap: 4px;
    }

    .filter-tab {
        text-align: center;
    }
}

@media (max-width: 480px) {
    #root {
        padding: 20px 16px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .count-display {
        font-size: 3rem;
    }

    .advanced-section {
        padding: 16px;
    }

    .todo-item {
        padding: 12px 16px;
    }

    .todo-text {
        font-size: 0.95rem;
    }
}
