/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f7;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 40px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

h1 {
    text-align: center;
    padding: 30px 20px;
    background: #ffffff;
    color: #333;
    margin: 0;
    font-weight: 600;
    font-size: 28px;
    border-bottom: 1px solid #e0e0e0;
}

/* 表单样式 */
.url-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

input[type="url"],
select {
    width: 100%;
    padding: 14px;
    border: 1px solid #d1d1d1;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background-color: #fafafa;
}

input[type="url"]:focus,
select:focus {
    border-color: #007AFF;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
    background-color: #fff;
}

button {
    width: 100%;
    padding: 16px;
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

button:hover {
    background: #0062cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

button:active {
    transform: translateY(0);
}

/* 结果样式 */
.result {
    padding: 30px;
    text-align: center;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

.result h2 {
    color: #28a745;
    margin-bottom: 20px;
    font-weight: 500;
}

.short-url {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    word-break: break-all;
    font-size: 16px;
}

.short-url a {
    color: #007AFF;
    text-decoration: none;
    font-weight: 500;
}

.short-url a:hover {
    text-decoration: underline;
}

/* 错误提示 */
.error {
    padding: 15px;
    margin: 20px;
    background: #fff5f5;
    color: #c53030;
    border-radius: 8px;
    border: 1px solid #fed7d7;
    font-size: 14px;
}

/* 使用说明 */
.instructions {
    padding: 0 30px 30px;
    border-top: 1px solid #e0e0e0;
}

.instructions h3 {
    margin-bottom: 15px;
    color: #4a5568;
    font-weight: 500;
}

.instructions ul {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 10px;
    color: #555;
    font-size: 14px;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 14px;
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .container {
        margin: 20px auto;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    h1 {
        padding: 20px 15px;
        font-size: 24px;
    }
    
    .url-form,
    .result,
    .instructions {
        padding: 20px 15px;
    }
    
    input[type="url"],
    select,
    button {
        padding: 14px 12px;
        font-size: 16px;
    }
}

/* MAC风格按钮 */
.mac-button {
    background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
    color: #333;
    border: 1px solid #b0b0b0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 400;
}

.mac-button:hover {
    background: linear-gradient(to bottom, #e0e0e0, #d0d0d0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.mac-button:active {
    background: linear-gradient(to bottom, #d0d0d0, #c0c0c0);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}