/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* 容器样式 */
.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    overflow: hidden;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主体样式 */
main {
    padding: 30px;
}

.input-section,
.result-section {
    margin-bottom: 30px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #555;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.options {
    margin: 15px 0;
}

#separator {
    width: 60px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
}

#separator:focus {
    outline: none;
    border-color: #4facfe;
}

/* 按钮样式 */
button {
    padding: 12px 24px;
    margin-right: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#convert-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

#convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

#copy-btn {
    background: #6c757d;
    color: white;
}

#copy-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

#clear-btn {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
}

#clear-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* 结果区域样式 */
.result-box {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    word-break: break-all;
    white-space: pre-wrap;
}

/* 底部样式 */
footer {
    background: #f8f9fa;
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        max-width: 100%;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }
    
    button {
        display: block;
        width: 100%;
        margin-right: 0;
    }
}

/* 加载状态 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}