
/* 通用样式 */
body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    min-height: 100vh; /* 使用最小高度来确保内容可以滚动 */
    background: linear-gradient(135deg, #6e45e2, #88d3ce);
    color: #333;
    overflow: auto;
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

/* 容器样式 */
.wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
    overflow: auto;
}

/* 卡片风格 */
.card {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 600px; /* 增加卡片的最大宽度 */
    text-align: center;
    animation: fadeIn 0.6s ease-in-out;
    margin: 20px auto;
    overflow: auto;
    resize: both;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

/* 输入框与选择框样式 */
textarea,
input,
select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 16px;
    transition: border 0.3s ease;
    resize: vertical;
}

textarea:focus,
input:focus,
select:focus {
    border-color: #6e45e2;
    outline: none;
}

/* 按钮样式 */
button {
    background-color: #6e45e2;
    color: #fff;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
}

button:hover {
    background-color: #5638d7;
    transform: translateY(-2px);
}

button:active {
    background-color: #482dc7;
    transform: translateY(0);
}

#code-card,
#text-card {
    margin-top: 20px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    overflow: auto;
    max-height: 300px; /* 设置默认高度 */
}

#copy-text-button {
    margin-top: 10px; /* 增加按钮和卡片之间的间距 */
}

.hidden {
    display: none;
}

/* 自定义时间选择 */
#custom-expiration {
    margin-top: 10px;
}

label {
    font-size: 14px;
    color: #888;
    text-align: left;
    display: block;
    margin-bottom: 5px;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* PC 浏览器布局 */
@media (min-width: 1024px) {
    .card {
        max-width: 800px;
    }

    #text-input,
    #text-card {
        height: 400px; /* 增加输入和输出区域的默认高度 */
    }
}

/* 移动浏览器布局 */
@media (max-width: 768px) {
    .card {
        width: 95%;
        max-width: 500px;
    }

    #text-input,
    #text-card {
        height: 200px; /* 设置较小的默认高度，便于适应小屏幕 */
    }
}

@media (max-width: 500px) {
    .card {
        padding: 15px;
    }
    h1 {
        font-size: 22px;
    }
    textarea,
    input,
    select,
    button {
        font-size: 14px;
        padding: 10px;
    }
}

@media (max-width: 350px) {
    h1 {
        font-size: 20px;
    }
    textarea,
    input,
    select,
    button {
        font-size: 12px;
        padding: 8px;
    }
}
