:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6b8cbc;
    --accent-color: #ff7e5f;
    --light-color: #f5f7fa;
    --dark-color: #2c3e50;
    --text-color: #333;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --error-color: #f1451f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: '微软雅黑', sans-serif;
}

body {
    position: relative;
    background-image: linear-gradient(to bottom, #f5f7fa 0%, #c3cfe2 100%);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    max-width: 1200px;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--text-color);
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 20px;
    background-color: var(--primary-color);
    color: var(--light-color);
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.left-slogan {
    font-family: "微软雅黑 Light", sans-serif;
    font-weight: 900;
    font-size: 1rem;
    cursor: default;
}

header .right-nav {
    display: flex;
}

/* 默认隐藏 */
header .drop_down_box {
    position: relative;
    display: flex;
    align-content: center;
    justify-content: center;
    width: 100px;
    display: none; /* 默认隐藏 */
}

header ul li {
    margin-left: 20px;
}

header ul li a {
    color: var(--light-color);
}

header ul li a:hover {
    color: var(--accent-color);
    transition: all 0.3s ease-in-out;
}

header ul li:first-child {
    margin-left: 0;
}

header button {
    border: none;
    cursor: pointer;
    background-color: var(--accent-color);
    color: var(--light-color);
    min-width: 100px;
    height: 40px;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

main {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    padding: 20px;
}

.container {
    width: 100%;
    height: auto;
    min-height: 100%;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.record-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.record-card:hover {
    transform: translateY(-5px);
}

.card-media {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.card-date {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.card-text {
    margin-bottom: 15px;
    line-height: 1.5;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    background-color: #e0e7ff;
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
}

footer {
    height: 60px;
    line-height: 60px;
    width: 100%;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--light-color);
    flex-shrink: 0;
}

/* 添加一些示例内容样式 */
.demo-content {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.demo-content h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.demo-content p {
    line-height: 1.6;
    margin-bottom: 10px;
}
#dialog {
    width: 30rem;
    min-height: 30rem;
    background: #2c3e50;
    padding: 20px 0;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: none;
}
#dialog .dialog-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}
#dialog .dialog-content label {
    width:  25rem;
    text-align: left;
    margin-bottom: 10px;
}
#dialog .dialog-content input,
#dialog .dialog-content textarea,
#dialog .dialog-content select {
    text-indent: 10px;
    outline: none;
    border: none;
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

#dialog .dialog-content input {
    width: 25rem;
    height: 30px;
}
#dialog .dialog-content input::placeholder {
    color: white;
}
#dialog .dialog-content input:focus{
    outline: none;
}
#dialog .dialog-content textarea{
    width: 25rem;
    resize: none;
}
#dialog .dialog-content textarea::placeholder {
    color: white;
}
#dialog .dialog-content textarea:focus{
    outline: none;
}
#dialog .dialog-content select {
    width: 25rem;
    height: 30px;
}
#dialog .dialog-content select option {
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent-color);
}
#dialog .dialog-content .button-box {
    width: 25rem;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}
#dialog .dialog-content .button-box button {
    width: 100%;
    height: 30px;
    background: var(--primary-color);
    color: var(--light-color);
    border: none;
    outline: none;
    cursor: pointer;
}
#dialog .dialog-content .button-box button[type=button]{
    position: absolute;
    background: none;
    width: 20px;
    height: 20px;
    top: 10px;
    right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}
#dialog .dialog-content .button-box button[type=button] svg {

}
/* 在媒体查询中显示下拉菜单 */
@media (max-width: 768px) {
    header .right-nav, header button {
        display: none;
    }
    
    /* 在移动端显示下拉菜单 */
    header .drop_down_box {
        position: relative;
        display: flex;
        align-content: center;
        justify-content: center;
        z-index: 999;
        width: 100px;
    }
    
    header .drop_down_box .three-lines {
        width: 30px;
        height: 20px;
        cursor: pointer;
    }
    header .drop_down_box .three-lines .line{
        width: 100%;
        height: 2px;
        background: var(--light-color);
    }
    header .drop_down_box .three-lines .two {
        margin-top: 5px;
    }
    header .drop_down_box .three-lines .three {
        margin-top: 5px;
    }
    header .drop_down_box .drop_down_list{
        position: absolute;
        top: 20px;
        width: 100%;
        height: auto;
        justify-content: center;
        display: none;
        flex-direction: column;
        align-items: center;
        background: var(--primary-color);

    }
    header .drop_down_box .drop_down_list  li {
        padding: 5px;
        margin: 0;
    }
    header .drop_down_box button{
        min-width: auto;
        padding: 0;
        display: block;
        background: none;
    }
    header .drop_down_box .show {
        display: flex;
    }
    #dialog {
        width: 20rem;
        padding: 20px 0;
    }
    #dialog .dialog-content h1 {
        font-size: 20px;
    }
    #dialog .dialog-content label {
        width:  15rem;
    }
    #dialog .dialog-content input,
    #dialog .dialog-content textarea,
    #dialog .dialog-content input {
        width: 15rem;
    }
    #dialog .dialog-content input:focus{
        outline: none;
    }
    #dialog .dialog-content textarea{
        width: 15rem;
    }
    #dialog .dialog-content textarea:focus{
        outline: none;
    }
    #dialog .dialog-content select {
        width: 15rem;
    }
    #dialog .dialog-content select option {
        width: 15rem;
    }
    #dialog .dialog-content .button-box {
        width: 15rem;
    }
}
