/* 全局样式 & 黑色炫酷主题 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212; /* 深邃黑 */
    color: #e0e0e0; /* 柔和白 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    background-color: #1e1e1e; /* 深灰容器背景 */
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 255, 255, 0.1); /* 青色辉光效果 */
    width: 100%;
    max-width: 600px;
    text-align: center;
    border: 1px solid rgba(0, 255, 255, 0.2); /* 微弱的青色边框 */
}

h1 {
    color: #00e5ff; /* 明亮青色 */
    margin-bottom: 25px;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

textarea#text-input {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #444; /* 深灰边框 */
    border-radius: 8px;
    background-color: #2b2b2b; /* 稍亮的输入框背景 */
    color: #f0f0f0; /* 浅色文本 */
    font-size: 1rem;
    resize: vertical; /* 允许垂直调整大小 */
    outline: none; /* 移除默认轮廓 */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea#text-input:focus {
    border-color: #00e5ff; /* 聚焦时青色边框 */
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3); /* 聚焦时青色辉光 */
}

.button-group {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    flex-wrap: wrap; /* 在小屏幕上换行 */
    gap: 15px; /* 按钮间距 */
}

button {
    padding: 12px 25px;
    border: none;
    border-radius: 25px; /* 圆角按钮 */
    background: linear-gradient(45deg, #0077ff, #00e5ff); /* 蓝色到青色渐变 */
    color: #121212; /* 深色文字 */
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    outline: none;
    min-width: 150px; /* 保证按钮最小宽度 */
}

button:hover {
    transform: translateY(-2px); /* 轻微上移效果 */
    box-shadow: 0 6px 15px rgba(0, 229, 255, 0.3); /* 悬停时更强的辉光 */
}

button:active {
    transform: translateY(0px); /* 点击时恢复 */
    box-shadow: 0 3px 10px rgba(0, 229, 255, 0.2); /* 点击时辉光减弱 */
}

#qrcode-container {
    margin-top: 20px;
    min-height: 220px; /* 为二维码和边距留出足够空间 */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #2b2b2b; /* 与输入框背景一致 */
    border-radius: 8px;
    padding: 20px; /* 容器内边距 */
    border: 1px dashed #444; /* 虚线边框 */
}

#qrcode-container img {
    /* qrcode.js生成的img标签会自动设置宽高 */
    display: block;
    background-color: white; /* 二维码标准背景 */
    padding: 10px; /* 二维码图像周围的白边 */
    border-radius: 5px; /* 轻微圆角 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#qrcode-container .placeholder {
    color: #777; /* 占位符文字颜色 */
    font-style: italic;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    h1 {
        font-size: 1.8rem;
    }
    .button-group {
        flex-direction: column; /* 垂直排列按钮 */
        align-items: center;
    }
    button {
        width: 80%; /* 让按钮更宽 */
    }
    #qrcode-container {
        min-height: 200px; /* 减小高度 */
    }
}