* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f3f4f6, #d1d5db);
    color: #111827;
    min-height: 100vh;
    transition: background 0.6s ease, color 0.3s ease;
}

body.dark {
    background: linear-gradient(135deg, #111827, #1e293b);
    color: #f3f4f6;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.6rem;
    font-weight: 800;
    background: linear-gradient(90deg, #4f46e5, #c026d3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(15deg);
}

.theme-toggle::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-toggle:hover::after {
    opacity: 1;
}

.form-section {
    background: #ffffff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

body.dark .form-section {
    background: #1e293b;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.input-group {
    position: relative;
    margin-bottom: 30px;
}

label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: #374151;
    transition: color 0.3s ease;
}

body.dark label {
    color: #d1d5db;
}

input, select, textarea {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #e5e7eb;
    font-size: 1rem;
    transition: all 0.3s ease;
}

body.dark input,
body.dark select,
body.dark textarea {
    background: #374151;
    color: #f3f4f6;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    background: #f3f4f6;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
    animation: breathe 2s ease infinite;
}

body.dark input:focus,
body.dark select:focus,
body.dark textarea:focus {
    background: #4b5563;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.01); }
}

.url-status {
    position: absolute;
    right: 10px;
    top: 40px;
    font-size: 0.8rem;
    color: #10b981;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.url-status.invalid {
    color: #ef4444;
    opacity: 1;
}

.url-status.valid {
    opacity: 1;
}

textarea {
    min-height: 140px;
    resize: vertical;
}

.send-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, #4f46e5, #c026d3);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.send-btn:active {
    transform: scale(0.98);
}

.send-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: scale(0);
    pointer-events: none;
}

.ripple.animate {
    animation: rippleEffect 0.6s ease-out;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.error-message {
    color: #ef4444;
    font-size: 0.9rem;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.response-section {
    background: #ffffff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

body.dark .response-section {
    background: #1e293b;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 5px solid #4f46e5;
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s ease-in-out infinite;
}

.loader.active {
    display: block;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111827;
}

body.dark h2 {
    color: #f3f4f6;
}

.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
}

.tab {
    padding: 10px 24px;
    border: none;
    background: #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

body.dark .tab {
    background: #374151;
    color: #f3f4f6;
}

.tab.active {
    background: #4f46e5;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.tab:hover::before {
    transform: scale(1.1);
}

.response-content {
    display: none;
    background: #f3f4f6;
    padding: 20px;
    border-radius: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-all;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
}

body.dark .response-content {
    background: #374151;
    color: #f3f4f6;
}

.response-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    h1 {
        font-size: 2rem;
    }

    .header {
        flex-direction: column;
        gap: 20px;
    }

    .form-section,
    .response-section {
        padding: 20px;
    }

    .send-btn {
        font-size: 1.1rem;
        padding: 14px;
    }

    .tab {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    input, select, textarea {
        padding: 12px;
        font-size: 0.9rem;
    }

    .send-btn {
        padding: 12px;
    }

    .url-status {
        top: 38px;
        font-size: 0.7rem;
    }
}