* {margin:0;padding:0;box-sizing:border-box}
body {
    min-height:100vh;
    font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    background:linear-gradient(135deg,#667eea 0%,#764ba2 50%,#f093fb 100%);
    background-attachment:fixed;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
    position:relative;
    overflow-x:hidden;
}
body::before {
    content:'';
    position:fixed;
    top:0;left:0;right:0;bottom:0;
    background:url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events:none;
}
.container {width:100%;max-width:480px;position:relative;z-index:1}
.query-card {
    background:rgba(255,255,255,0.95);
    backdrop-filter:blur(20px);
    border-radius:28px;
    padding:48px 40px;
    box-shadow:0 25px 80px rgba(0,0,0,0.2),0 0 0 1px rgba(255,255,255,0.3);
    animation:cardFloat 0.6s ease-out;
}
@keyframes cardFloat {
    from{opacity:0;transform:translateY(30px) scale(0.96)}
    to{opacity:1;transform:translateY(0) scale(1)}
}
.card-header {text-align:center;margin-bottom:36px}
.card-icon {
    width:72px;height:72px;
    background:linear-gradient(135deg,#667eea,#764ba2);
    border-radius:20px;
    display:flex;align-items:center;justify-content:center;
    margin:0 auto 20px;
    box-shadow:0 12px 30px rgba(102,126,234,0.4);
    animation:iconPulse 2s ease-in-out infinite;
}
@keyframes iconPulse {
    0%,100%{transform:scale(1)}
    50%{transform:scale(1.05)}
}
.card-icon svg {width:36px;height:36px;fill:white}
.card-title {
    font-size:28px;
    font-weight:700;
    background:linear-gradient(135deg,#667eea,#764ba2);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    background-clip:text;
    margin-bottom:8px;
}
.form-group {margin-bottom:24px}
.form-label {
    font-size:14px;
    font-weight:600;
    color:#374151;
    margin-bottom:10px;
    display:flex;
    align-items:center;
    gap:8px;
}
.form-label svg {width:16px;height:16px;fill:#9ca3af}
.input-wrapper {position:relative;margin-bottom:12px}
.form-input {
    width:100%;
    min-height:110px;
    padding:16px 20px 16px 48px;
    border:2px solid #e5e7eb;
    border-radius:16px;
    font-size:15px;
    background:#f9fafb;
    outline:none;
    transition:all 0.3s ease;
    font-family:inherit;
    resize:vertical;
    line-height:1.6;
    word-break:break-all;
}
.form-input:focus {
    border-color:#667eea;
    background:#fff;
    box-shadow:0 0 0 4px rgba(102,126,234,0.1);
}
.form-input::placeholder {color:#9ca3af}
.input-icon {
    position:absolute;
    left:16px;
    top:24px;
    width:20px;
    height:20px;
    fill:#9ca3af;
    transition:fill 0.3s ease;
}
.form-input:focus ~ .input-icon,
.input-wrapper:hover .input-icon {fill:#667eea}
.action-btns {
    display:flex;
    gap:10px;
    margin-bottom:20px;
}
.action-btn {
    flex:1;
    padding:12px;
    background:rgba(102,126,234,0.08);
    color:#667eea;
    border:2px solid rgba(102,126,234,0.3);
    border-radius:14px;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:all 0.3s ease;
    font-family:inherit;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    -webkit-tap-highlight-color:transparent;
    user-select:none;
}
.action-btn:hover {
    background:rgba(102,126,234,0.15);
    border-color:#667eea;
}
.action-btn:active {transform:scale(0.97)}
.action-btn svg {width:16px;height:16px;fill:#667eea}
.action-btn.paste-success {
    background:rgba(16,185,129,0.12);
    border-color:#10b981;
    color:#059669;
}
.action-btn.paste-success svg {fill:#059669}
.action-btn.copy-success {
    background:rgba(16,185,129,0.12);
    border-color:#10b981;
    color:#059669;
}
.action-btn.copy-success svg {fill:#059669}
#toast {
    position:fixed;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%) scale(0.9);
    background:rgba(31,41,55,0.95);
    color:#fff;
    padding:14px 24px;
    border-radius:14px;
    font-size:14px;
    font-weight:500;
    z-index:9999;
    opacity:0;
    pointer-events:none;
    transition:all 0.3s ease;
    max-width:80vw;
    text-align:center;
    box-shadow:0 8px 30px rgba(0,0,0,0.3);
}
#toast.show {
    opacity:1;
    transform:translate(-50%,-50%) scale(1);
}
.query-btn {
    width:100%;
    padding:18px;
    background:linear-gradient(135deg,#667eea,#764ba2);
    color:#fff;
    border:none;
    border-radius:16px;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    transition:all 0.3s ease;
    box-shadow:0 8px 25px rgba(102,126,234,0.4);
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    font-family:inherit;
}
.query-btn:hover {
    transform:translateY(-2px);
    box-shadow:0 12px 35px rgba(102,126,234,0.5);
}
.route-btn {
    width:100%;
    padding:14px;
    background:rgba(102,126,234,0.08);
    color:#667eea;
    border:2px solid rgba(102,126,234,0.3);
    border-radius:16px;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
    transition:all 0.3s ease;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-family:inherit;
    margin-bottom:16px;
}
.route-btn:hover {
    background:rgba(102,126,234,0.15);
    border-color:#667eea;
}
.route-btn:active {transform:scale(0.98)}
.route-btn svg {width:18px;height:18px;fill:#667eea}
.routes-container {
    display:none;
    margin-bottom:16px;
    padding:16px;
    background:rgba(102,126,234,0.04);
    border-radius:16px;
    border:1px dashed rgba(102,126,234,0.2);
    animation:routesFade 0.3s ease-out;
}
@keyframes routesFade {
    from{opacity:0;transform:translateY(-8px)}
    to{opacity:1;transform:translateY(0)}
}
.routes-title {
    font-size:13px;
    font-weight:600;
    color:#6b7280;
    margin-bottom:12px;
    display:flex;
    align-items:center;
    gap:6px;
}
.routes-title svg {width:14px;height:14px;fill:#9ca3af}
.routes-list {
    display:flex;
    flex-direction:column;
    gap:10px;
}
.route-item {
    padding:12px 18px;
    background:linear-gradient(135deg,#667eea,#764ba2);
    color:#fff;
    border:none;
    border-radius:12px;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:all 0.3s ease;
    font-family:inherit;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    width:100%;
}
.route-item:hover {
    transform:translateY(-2px);
    box-shadow:0 6px 18px rgba(102,126,234,0.4);
}
.route-item:active {transform:translateY(0)}
.route-item.active {
    background:linear-gradient(135deg,#10b981,#059669);
    box-shadow:0 4px 12px rgba(16,185,129,0.4);
}
.route-item .route-ip {
    font-size:12px;
    opacity:0.9;
    font-weight:400;
}
.route-success {
    display:none;
    margin-bottom:12px;
    padding:10px 14px;
    background:linear-gradient(135deg,#ecfdf5,#f0fdf4);
    border:1px solid #a7f3d0;
    border-radius:12px;
    color:#059669;
    font-size:13px;
    font-weight:600;
    text-align:center;
    animation:successFade 0.4s ease-out;
}
.route-success.show {display:block}
@keyframes successFade {
    from{opacity:0;transform:translateY(-6px)}
    to{opacity:1;transform:translateY(0)}
}
.route-loading {
    text-align:center;
    color:#6b7280;
    font-size:13px;
    padding:8px;
}
.query-btn:active {transform:translateY(0)}
.query-btn.loading {pointer-events:none;opacity:0.8}
.query-btn svg {width:20px;height:20px;fill:currentColor}
.btn-spinner {
    width:20px;height:20px;
    border:2px solid rgba(255,255,255,0.3);
    border-top-color:#fff;
    border-radius:50%;
    animation:spin 0.8s linear infinite;
    display:none;
}
.query-btn.loading .btn-spinner {display:block}
.query-btn.loading .btn-text {display:none}
@keyframes spin {to{transform:rotate(360deg)}}
.result-box {
    margin-top:28px;
    padding:24px;
    border-radius:20px;
    display:none;
    animation:resultFade 0.4s ease-out;
}
@keyframes resultFade {
    from{opacity:0;transform:translateY(-10px)}
    to{opacity:1;transform:translateY(0)}
}
.result-success {
    background:linear-gradient(135deg,#ecfdf5,#f0fdf4);
    border:1px solid #a7f3d0;
}
.result-error {
    background:linear-gradient(135deg,#fef2f2,#fee2e2);
    border:1px solid #fecaca;
    color:#dc2626;
    text-align:center;
    font-weight:500;
}
.result-item {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px 0;
    border-bottom:1px solid rgba(0,0,0,0.06);
    transition:background 0.2s ease;
}
.result-item:last-child {border-bottom:0}
.result-item:hover {background:rgba(255,255,255,0.5);border-radius:8px;margin:0 -8px;padding:12px 8px}
.result-label {
    display:flex;
    align-items:center;
    gap:8px;
    color:#6b7280;
    font-size:14px;
}
.result-label svg {width:16px;height:16px;fill:#9ca3af}
.result-value {font-weight:600;color:#1f2937;font-size:14px}
.remain {color:#10b981;font-weight:700}
.expire-normal {color:#f59e0b;font-weight:600}
.expire-expired {color:#ef4444;font-weight:600}
.expire-lifetime {color:#3b82f6;font-weight:600}
.footer-text {
    text-align:center;
    margin-top:24px;
    font-size:12px;
    color:#9ca3af;
}
@media (max-width:480px) {
    .query-card {padding:28px 20px}
    .card-title {font-size:22px}
    .card-icon {width:56px;height:56px;border-radius:16px}
    .card-icon svg {width:26px;height:26px}
    .form-input {min-height:96px;font-size:14px;padding:14px 16px 14px 42px}
    .input-icon {left:14px;top:22px;width:18px;height:18px}
    .action-btn {padding:11px;font-size:13px;gap:5px}
    .action-btn svg {width:15px;height:15px}
    .route-item {padding:9px 16px;font-size:13px}
    .route-btn {padding:12px;font-size:14px}
    .query-btn {padding:15px;font-size:15px}
}
@media (min-width:481px) and (max-width:1024px) {
    .container {max-width:520px}
    .query-card {padding:44px 36px}
}
@media (min-width:1025px) {
    .container {max-width:520px}
    .query-card {padding:52px 44px}
    .action-btn {padding:13px}
    .form-input {min-height:120px}
}
@media (hover:none) {
    .action-btn:hover {
        transform:none;
        background:rgba(102,126,234,0.08);
        border-color:rgba(102,126,234,0.3);
    }
    .route-btn:hover {
        transform:none;
        background:rgba(102,126,234,0.08);
        border-color:rgba(102,126,234,0.3);
    }
    .route-item:hover {
        transform:none;
        box-shadow:none;
    }
    .query-btn:hover {
        transform:none;
        box-shadow:0 8px 25px rgba(102,126,234,0.4);
    }
}
