body {
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1 {
    margin-top: 20px;
}

.regex-item {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.regex-item label {
    font-weight: 600;
    font-size: 1.3em;
}

.regex-item code {
    font-size: 1rem;
    display: block;
    margin: 10px 0;
}

.result {
    margin-top: 10px;
    padding: 10px;
    font-weight: bold;
}

.success {
    color: green;
    background-color: #e6f7e6;
}

.error {
    color: red;
    background-color: #f9d6d5;
}

.error-message {
    color: red;
    font-size: 1rem;
    margin-top: 10px;
    display: none;
}

.copy-btn {
    margin-top: 10px;
    display: inline-block;
}

.search-bar {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 页脚样式 */
footer {
    background-color: #f1f1f1;
    color: #333;
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
    position: relative;
}

footer a {
    color: #0d6efd;
    font-weight: bold;
    text-decoration: none;
}

footer a:hover {
    color: #0056b3; /* 悬停时颜色变为深蓝色 */
}

/* 返回顶部按钮样式 */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    color: rgb(0, 119, 255);
    border: none;
    font-size: 2em;
    cursor: pointer;
}

#back-to-top:hover {
    color: #b001c7;
}

/* ======================== */

.result {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
}
.success {
    background-color: #d4edda;
    color: #155724;
}
.error {
    background-color: #f8d7da;
    color: #721c24;
}
.highlight-yellow {
    background-color: yellow;
    font-weight: bold;
    font-size: larger;
}
.highlight-blue {
    background-color: lightblue;
    font-weight: bold;
    font-size: larger;
}

/* ============ */

@media (max-width: 576px) {
    .regex-item {
        padding: 15px;
    }

    .regex-item code {
        font-size: 0.85rem;
    }
}

