:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #3f37c9;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --success: #4cc9f0;
    --danger: #e63946;
    --warning: #ffbe0b;
    --info: #4895ef;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 5px 10px rgba(0,0,0,0.05);

    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e2e8f0 100%);
    color: var(--dark);
    min-height: 100vh;
    line-height: 1.6;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.header-content h1 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--gray);
    font-weight: 400;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.app-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.api-controls {
    grid-column: 1 / -1;
}

.endpoint-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.endpoint-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.endpoint-card.get {
    border-top: 4px solid #0f5132;
}

.endpoint-card.post {
    border-top: 4px solid #084298;
}

.endpoint-card.delete {
    border-top: 4px solid #842029;
}

.method {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.method.get {
    background: #d1e7dd;
    color: #0f5132;
}

.method.post {
    background: #cfe2ff;
    color: #084298;
}

.method.delete {
    background: #f8d7da;
    color: #842029;
}

.path {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    margin: 0.5rem 0;
    color: var(--dark);
    font-weight: 500;
}

.description {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.request-input {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.request-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
}

.api-response {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.response-container {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

#response-output {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.todo-list {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.items-container {
    margin-top: 1rem;
    display: grid;
    gap: 1rem;
}

.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary);
}

.todo-item.completed {
    opacity: 0.7;
    border-left-color: var(--gray);
}

.todo-text {
    flex: 1;
}

.todo-id {
    font-family: 'Courier New', monospace;
    color: var(--gray);
    font-size: 0.75rem;
    margin-right: 1rem;
}

.todo-date {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

.todo-actions {
    display: flex;
    gap: 0.5rem;
}

.delete-btn {
    background: var(--danger);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.app-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.version {
    margin-top: 0.5rem;
    font-family: 'Courier New', monospace;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-main {
        grid-template-columns: 1fr;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}