/* 美化整体页面 */
body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
}

/* 容器样式，高端大气 */
.container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 90%;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
    z-index: -1;
    filter: blur(20px);
    opacity: 0.6;
}

/* 标题 */
h1 {
    margin-bottom: 30px;
    text-align: center;
    color: #5d5dff;
    font-size: 28px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    display: inline-block;
    width: 100%;
}

h1::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #ff9a9e, #fad0c4);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* 文件输入区 */
#imageUpload {
    display: none;
}
.upload-label {
    display: block;
    padding: 16px 32px;
    background: linear-gradient(to right, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
    color: #fff;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    margin: 0 auto 30px;
    width: 80%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: none;
}
.upload-label:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    background: linear-gradient(to right, #fad0c4 0%, #ff9a9e 99%, #ff9a9e 100%);
}

/* 预览图片 */
#preview {
    display: block;
    margin: 20px auto;
    max-width: 150px;
    max-height: 150px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border: 3px solid #fff;
    background: #fff;
    padding: 5px;
}

/* 选择大小样式 */
.size-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.size-option {
    position: relative;
}

.size-option input[type="radio"] {
    display: none;
}

.size-option label {
    display: inline-block;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
}

.size-option input[type="radio"]:checked + label {
    background: linear-gradient(to right, #5d5dff, #a18cd1);
    color: white;
    border-color: #5d5dff;
    box-shadow: 0 5px 15px rgba(93, 93, 255, 0.4);
}

.size-option label:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 转换按钮 */
#convertButton {
    display: block;
    width: 80%;
    padding: 18px;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(to right, #5d5dff 0%, #a18cd1 100%);
    border: none;
    border-radius: 50px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(93, 93, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}
#convertButton:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(93, 93, 255, 0.6);
    background: linear-gradient(to right, #a18cd1 0%, #5d5dff 100%);
}

/* 消息提示 */
.message {
    margin-top: 20px;
    text-align: center;
    color: #ff4757;
    font-weight: 600;
    font-size: 16px;
    min-height: 24px;
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: 30px;
    color: #6c757d;
    font-size: 14px;
}

.footer a {
    color: #5d5dff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: #ff9a9e;
    text-decoration: underline;
}