/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 10px;
}

/* 主要内容区域 */
.main-content {
    padding: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.example-buttons {
    display: flex;
    gap: 10px;
}

.example-btn {
    background: #eef2ff;
    border: 2px solid #c7d2fe;
    color: #4f46e5;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.example-btn:hover {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

/* 输入区域样式 */
.url-input-container {
    background: #f8fafc;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

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

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #4b5563;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-button {
    display: flex;
    gap: 15px;
}

#url-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#url-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.primary-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.input-hint {
    margin-top: 10px;
    color: #6b7280;
    font-size: 0.9rem;
    font-style: italic;
}

/* 结果区域样式 */
.results-container {
    background: #f8fafc;
    border-radius: 15px;
    padding: 30px;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: white;
    border: 2px solid #d1d5db;
    color: #6b7280;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.single-result {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 5px solid #4f46e5;
}

.result-item {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.result-label {
    font-weight: 600;
    color: #4b5563;
    min-width: 120px;
}

.result-value {
    flex: 1;
    word-break: break-all;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.original-url {
    color: #dc2626;
}

.corrected-url {
    color: #059669;
    font-weight: 600;
}

.status {
    color: #4f46e5;
    font-weight: 600;
}

/* 页脚样式 */
.footer {
    background: #1f2937;
    color: white;
    padding: 25px 40px;
    text-align: center;
}

.footer p {
    margin-bottom: 8px;
}

.footer-simple {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* 通知样式 */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #10b981;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* 响应式设计 - 平板设备 */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
        border-radius: 15px;
    }
    
    .header {
        padding: 30px;
    }
    
    .logo h1 {
        font-size: 2.2rem;
    }
    
    .main-content {
        padding: 30px;
    }
    
    .url-input-container,
    .results-container {
        padding: 25px;
    }
}

/* 响应式设计 - 移动设备 */
@media (max-width: 768px) {
    body {
        padding: 10px;
        background: #f5f7fa;
    }
    
    .container {
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    }
    
    .header {
        padding: 25px 20px;
    }
    
    .logo {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 8px;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .logo h1 {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-top: 8px;
        line-height: 1.4;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
        width: 100%;
    }
    
    .example-buttons {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
    }
    
    .example-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 80px;
        text-align: center;
    }
    
    .url-input-container {
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 12px;
    }
    
    .input-group {
        margin-bottom: 20px;
    }
    
    .input-group label {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .input-with-button {
        flex-direction: column;
        gap: 12px;
    }
    
    #url-input {
        padding: 14px 16px;
        font-size: 1rem;
        width: 100%;
    }
    
    .primary-btn {
        padding: 14px 20px;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
    }
    
    .input-hint {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-top: 8px;
    }
    
    .results-container {
        padding: 20px;
        border-radius: 12px;
    }
    
    .result-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }
    
    .action-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
        flex: 1;
    }
    
    .single-result {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .result-item {
        flex-direction: column;
        margin-bottom: 12px;
        align-items: flex-start;
    }
    
    .result-label {
        min-width: auto;
        margin-bottom: 5px;
        font-size: 0.95rem;
    }
    
    .result-value {
        width: 100%;
        font-size: 0.9rem;
        padding: 10px;
        word-break: break-word;
    }
    
    .footer {
        padding: 20px;
    }
    
    .footer p {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .footer-simple {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* 移动端通知调整 */
    .notification {
        left: 20px;
        right: 20px;
        bottom: 20px;
        text-align: center;
        padding: 12px 20px;
    }
}

/* 响应式设计 - 小屏手机 */
@media (max-width: 480px) {
    .header {
        padding: 20px 15px;
    }
    
    .logo h1 {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .example-btn {
        padding: 7px 10px;
        font-size: 0.85rem;
    }
    
    .url-input-container,
    .results-container {
        padding: 18px;
    }
    
    #url-input {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    
    .primary-btn {
        padding: 12px 18px;
        font-size: 0.95rem;
    }
    
    .single-result {
        padding: 18px;
    }
    
    .result-label {
        font-size: 0.9rem;
    }
    
    .result-value {
        font-size: 0.85rem;
        padding: 8px;
    }
    
    .footer {
        padding: 18px 15px;
    }
    
    .notification {
        left: 15px;
        right: 15px;
        bottom: 15px;
        font-size: 0.9rem;
        padding: 10px 15px;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 10px;
    }
    
    .container {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .header {
        padding: 20px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .url-input-container,
    .results-container {
        padding: 15px;
    }
}

/* 移动端触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .example-btn,
    .primary-btn,
    .action-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    #url-input {
        font-size: 16px; /* 防止iOS自动缩放 */
    }
    
    .primary-btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .example-btn:active,
    .action-btn:active {
        background: #f3f4f6;
    }
}

/* 防止移动端长按选择 */
.example-btn,
.primary-btn,
.action-btn,
#url-input,
.result-value {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

#url-input,
.result-value {
    -webkit-user-select: text;
    user-select: text;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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