/* 全局样式 */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 卡片样式 */
.card {
    padding: 2rem;
    background: white;
    margin: 0;
}

.card h2 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #34495e;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

/* 高级选项 */
.advanced-options {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.advanced-options h3 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* 复选框样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 结果容器 */
.result-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 12px;
    border-left: 4px solid #28a745;
}

.result-container h3 {
    margin: 0 0 1rem 0;
    color: #155724;
    font-size: 1.2rem;
}

.link-container {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.link-container input {
    flex: 1;
    background: white;
    border: 2px solid #28a745;
    margin-bottom: 0;
}

.link-container button {
    flex-shrink: 0;
}

/* 消息显示 */
.message-container {
    margin-top: 1rem;
}

.message-container h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.message-content-wrapper {
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
    overflow: hidden;
}

.message-content-wrapper pre {
    margin: 0;
    padding: 1.5rem;
    background: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #2c3e50;
}

.warning-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-radius: 8px;
    border-left: 4px solid #dc3545;
}

.warning {
    margin: 0 0 0.5rem 0;
    color: #721c24;
    font-weight: 600;
    font-size: 1rem;
}

.info {
    margin: 0;
    color: #856404;
    font-size: 0.9rem;
}

/* 状态消息 */
.status-message {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

/* 操作按钮 */
.action-buttons {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

/* 页脚 */
footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 2rem;
}

.security-info h3 {
    margin: 0 0 1rem 0;
    color: #3498db;
    font-size: 1.2rem;
}

.security-info ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.security-info li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #34495e;
}

.security-info li:last-child {
    border-bottom: none;
}

.tech-info {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 8px;
    }
    
    header {
        padding: 1.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .link-container {
        flex-direction: column;
    }
    
    .advanced-options {
        margin: 1.5rem 0;
        padding: 1rem;
    }
    
    footer {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .card h2 {
        font-size: 1.5rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .link-container button {
        width: 100%;
    }
}