* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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;
    padding: 10px;
    line-height: 1.6;
}

/* Toast 提示框样式 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
    font-size: 15px;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast::before {
    content: '✅';
    font-size: 18px;
}

@keyframes toastPulse {
    0%, 100% {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    50% {
        transform: translateX(-50%) translateY(0) scale(1.05);
    }
}

.toast.show {
    animation: toastPulse 0.5s ease;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

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

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 20px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 600;
}

.header p {
    opacity: 0.9;
    font-size: 14px;
}

.search-section {
    padding: 25px 20px;
}

.tips {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #1565c0;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 20px;
}

.input-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    -webkit-appearance: none;
}

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

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
    pointer-events: none;
}

.btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    -webkit-appearance: none;
    -webkit-user-select: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading {
    text-align: center;
    padding: 30px;
    display: none;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results {
    padding: 0 20px 25px;
    display: none;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.results-header h3 {
    color: #333;
    font-size: 18px;
}

.result-count {
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.result-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.result-header {
    margin-bottom: 12px;
}

.result-id-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.result-id {
    font-family: 'Courier New', monospace;
    background: #667eea;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

.copy-btn.copied {
    background: #17a2b8;
}

.result-time {
    color: #6c757d;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.result-content {
    color: #333;
    line-height: 1.5;
    margin-bottom: 12px;
    font-size: 14px;
    word-break: break-word;
}

.result-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #6c757d;
    flex-wrap: wrap;
}

.result-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.error {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    font-size: 14px;
    line-height: 1.5;
}

.stats {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    text-align: center;
    font-size: 14px;
}

/* 针对超小屏幕的优化 */
@media screen and (max-width: 380px) {
    .header h1 {
        font-size: 20px;
    }

    .header p {
        font-size: 13px;
    }

    .search-section {
        padding: 20px 15px;
    }

    .result-item {
        padding: 15px;
    }

    .result-id-wrapper {
        gap: 8px;
    }

    .copy-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* 防止iOS Safari缩放 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select, textarea, input[type="text"], input[type="password"],
    input[type="datetime"], input[type="datetime-local"],
    input[type="date"], input[type="month"], input[type="time"],
    input[type="week"], input[type="number"], input[type="email"],
    input[type="url"], input[type="search"], input[type="tel"],
    input[type="color"] {
        font-size: 16px;
    }
}
