/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f8f5f0;
    color: #333;
    min-width: unset;
    line-height: 1.6;
    background-size: cover;
    background-attachment: fixed;
    background-position:bottom  center;
    background-image: url("images/bg1.png");
}

/* 页头样式 */
.page-header {
    background-image: url('images/banner.gif') ;
    background-size: cover;
    background-position: top center;
    padding: 60px 20px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.tips-p{font-size: 12px;color:#c1573f;font-weight:bold;padding:5px 0;text-align:center;letter-spacing: -0.5px;}

.header-content {
    position: relative;
    z-index: 2;
    height: 100px;
}

.page-header h1 {
display: none;
}

.page-header p {
display: none;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .page-header {
        padding: 30px 15px;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .page-header p {
        font-size: 16px;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-section {
        text-align: center;
    }
}

/* 主容器 */
.museum-calendar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    /*! background-color: rgba(255, 255, 255, 0.5); */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* 顶部导航栏 */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d4a76a;
    position: relative;
}

.calendar-header::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4a76a, transparent);
}

.calendar-header h1 {
    font-size: 24px;
    color: #c1573f;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-header h1::before {
    content: 'ðŸ›ï¸';
    font-size: 28px;
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.view-toggle button {
    padding: 8px 16px;
    border: 1px solid #d4a76a;
    background-color: #fff;
    color: #c1573f;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.view-toggle button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(138, 75, 30, 0.1), transparent);
    transition: left 0.5s ease;
}

.view-toggle button:hover::before {
    left: 100%;
}

.view-toggle button.active {
    background-color: #c1573f;
    color: #fff;
    box-shadow: 0 2px 8px rgba(138, 75, 30, 0.3);
}

/* 搜索和筛选 */
.search-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.search-filter input,
.search-filter select {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid #d4a76a;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-filter input:focus,
.search-filter select:focus {
    outline: none;
    border-color: #c1573f;
    box-shadow: 0 0 0 2px rgba(138, 75, 30, 0.2);
}

.date-range {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.date-range input {
    min-width: 150px;
}

.date-range button {
    padding: 10px 16px;
    border: 1px solid #d4a76a;
    background-color: #c1573f;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.date-range button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.date-range button:hover::before {
    left: 100%;
}

.date-range button:hover {
    background-color: #6d3a17;
    box-shadow: 0 2px 8px rgba(138, 75, 30, 0.3);
}

/* 日历导航 */
.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    flex-wrap: nowrap;
}

.calendar-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d4a76a, #c1573f, #d4a76a);
}

.calendar-nav h2 {
    font-size: 18px;
    color: #c1573f;
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: unset;
    margin: 0 10px;
    flex-direction: row;
}

.calendar-nav button {
    padding: 8px 12px;
    border: 1px solid #d4a76a;
    background-color: #fff;
    color: #c1573f;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.calendar-nav button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(138, 75, 30, 0.1), transparent);
    transition: left 0.5s ease;
}

.calendar-nav button:hover::before {
    left: 100%;
}

.calendar-nav button:hover {
    background-color: #f0e6d2;
    box-shadow: 0 2px 4px rgba(138, 75, 30, 0.2);
}
/* 日历视图 */
.calendar-container {
    position: relative;
}

.calendar-view {
    display: none;

    border-radius: 8px;

    box-shadow: 0 2px 8px rgba(0,0,0,0);
    animation: fadeIn 0.5s ease;

    background-position: center;
    position: relative;
}

.calendar-view::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0);
    border-radius: 8px;
    z-index: 0;
}

.calendar-view > * {
    position: relative;
    z-index: 1;
}

.calendar-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 月视图 */
#month-view {
    width: 100%;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.weekday {
    text-align: center;
    font-weight: bold;
    color: #d82928;
    padding: 12px;
    /* border-radius: 4px; */
    position: relative;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.weekday::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.weekday:hover::before {
    opacity: 1;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    background-color: #fff;
    overflow: hidden;
    padding: 8px;
}

.day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(212, 167, 106, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.day:hover::before {
    opacity: 1;
}

.day:hover {
    background-color: #f0e6d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.day.today {
    background-color: #e8d4b8;
    font-weight: bold;
    border-color: #d82928;
    box-shadow: 0 0 0 2px rgba(212, 167, 106, 0.5);
    color: #d82928;
}

.day.other-month {
    color: #ccc;
    background-color: #f9f9f9;
}

.day.has-exhibition {
    position: relative;
    background-color: #fff9f0;
    border-color: #d4a76a;
}



/* 年视图 */
#year-view {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.months-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 10px 0;
    animation: slideIn 0.8s ease;
}

.month-row {
    display: flex;
    gap: 15px;
}

.month-group {
    display: flex;
    gap: 15px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    overflow: hidden;
    flex: 1;
    margin:0;
}



.month-group .month-card h3{display:none;height:100%!important;}





@media (max-width: 768px) {
    .months-grid {
        gap: 25px;
    }
    
    .month-row {
        gap: 10px;
    }
    
    .month-group {
        width: 350px;
        gap: 10px;
        /* height: 66px; */
        height: 313px;
        flex-shrink: 0;
    }
    
    .month-card {
        padding-top: 0;
        align-items: flex-end;
    }
    
    
    .month-card h3 {
        font-size: 14px;
        text-align: right;
        padding-right: 10px;
        padding-bottom: 10px;
        letter-spacing: -1px;
        transform: translate(30px, 25px);
    }
}

@media (max-width: 480px) {
    .months-grid {
        gap: 20px;
    }
    
    .month-row {
        gap: 8px;
    }
    
    .month-group {
        width: 250px;
        gap: 8px;
        /* height: 66px; */
        height: 213px;
        flex-shrink: 0;
    }
    
    .month-card {
        padding-top: 0;
        align-items: flex-end;
    }
    
    .month-card h3 {
        font-size: 14px;
        text-align: right;
        padding-right: 10px;
        padding-bottom: 10px;
        letter-spacing: -1px;
        transform: translate(30px, 25px);
    }
}

@media (max-width: 360px) {
    .months-grid {
        gap: 15px;
    }
    
    .month-row {
        gap: 6px;
    }
    
    .month-group {
        width: 200px;
        gap: 6px;
        /* height:66px; */
        height: 170px;
        flex-shrink: 0;
    }
    
    .month-card {
        padding-top: 0;
        align-items: flex-end;
    }
    
    .month-card h3 {
        font-size: 14px;
        text-align: right;
        padding-right: 8px;
        padding-bottom: 8px;
        letter-spacing: -1px;
        transform: translate(30px, 25px);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.month-card {
    flex: 1;
    margin: 0;
    background: none !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15px;
    height: 100%;
}

.month-card:hover {
    transform: translateY(-5px);
    /*! box-shadow: 0 8px 16px rgba(0,0,0,0.1); */
}

.month-card h3 {
    color:#FF6632;
    font-size:28px;
    font-weight: bold;
    margin: 0;
    text-align: center;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.exhibition-count {
    display: none;
}

.month-card:nth-child(n) h3::before {
    display: none;
}

.month-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    font-size: 12px;
}
.qr-p{    color: #c1573f;
    margin: 0;
    font-size: 16px;}

.month-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    border: 1px solid #e0e0e0;
}

.month-day:hover {
    background-color: #f0e6d2;
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.month-day.has-exhibition {
    background-color: #e8d4b8;
    border-color: #d4a76a;
    position: relative;
}



/* 展览详情面板 */
.exhibition-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 90%;
    max-width: 400px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-left: 4px solid #65b4d3;
}

.exhibition-panel.open {
    right: 0;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        right: -100%;
    }
    to {
        right: 0;
    }
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f2fff8;
    position: relative;
}

.panel-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(138, 75, 30, 0.1), transparent);
}

.panel-header h3 {
    color: #c1573f;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;        
    font-size: 16px;
}

.panel-header h3::before {
    content: '';
    width: 20px;
    height: 20px;
    background-image: url('images/33.jpg');
    background-size: cover;
    background-position: center;
    display: inline-block;
}

#close-panel {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #c1573f;
    z-index: 1;
    transition: all 0.3s ease;
}

#close-panel:hover {
    transform: rotate(90deg);
    color: #6d3a17;
}

.exhibition-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #f9f6f1;
}

.exhibition-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    transition: all 0.3s ease;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.exhibition-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.exhibition-item:last-child {
    margin-bottom: 0;
}

.exhibition-item h4 {
    color: #c1573f;
    margin-bottom: 5px;
    font-size: 16px;
    border-bottom: 1px solid #f0e6d2;
    padding-bottom: 5px;
    font-weight: bold;
}

.exhibition-item p {
    font-size: 14px;
    color: #666;
    margin: 3px 0;
    line-height: 1.5;
}

.exhibition-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.exhibition-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 当日展览显示框 */
.today-exhibitions {
    margin-top: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    /*! border-left: 4px solid #c1573f; */
    position: relative;
    overflow: hidden;
        border-top-left-radius: 25px;
       border-top-right-radius: 25px;
    border-top: 6px solid #ff6731;
}


.today-exhibitions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.today-exhibitions h3 {
    color: #fff;
  font-size: 22px;
  line-height: 1.5;
  margin:0 auto;
  cursor: pointer;
  transition: transform 0.3s; 
    margin-bottom: 15px;
   text-align: center;

    background: linear-gradient(90deg, #68b6d4, #97dfdc, #a6ecdf);
  
    border-radius: 25px;
    width: 240px;
    font-weight: bold;
    letter-spacing: 2px;
}

.today-exhibitions h3::before {

    font-size: 20px;
}

#today-exhibition-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.today-exhibition-item {
    padding: 12px;
    background-color: #f2fff8;
    border-radius: 6px;
    border-left: 3px solid #65b4d3;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.today-exhibition-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(242, 255, 248, 0.1), transparent);
    transition: left 0.5s ease;
}

.today-exhibition-item:hover::before {
    left: 100%;
}

.today-exhibition-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: #f2fff8;
}

.today-exhibition-item h4 {
    color: #c1573f;
    margin: 0;
    font-size: 16px;
    position: relative;
    z-index: 1;
    font-weight: bold;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    display: none;
    background-image: url('images/2022061616281655736.png');
    background-size: cover;
    background-position: center;
}

.loading.show {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0e6d2;
    border-top: 4px solid #c1573f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 10px rgba(138, 75, 30, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .museum-calendar {
        padding: 10px;
        margin: 10px;
    }
    
    .calendar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .search-filter {
        flex-direction: column;
    }
    
    .search-filter input,
    .search-filter select {
        width: 100%;
    }
    
    .weekdays {
        gap: 6px;
    }
    
    .weekday {
        padding: 8px;
        font-size: 14px;
    }
    
    .days {
        gap: 6px;
    }
    
    .day {
        font-size: 14px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px;
        min-height: 70px;
    }

    .months-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 10px;
    }

    .exhibition-panel {
        width: 100%;
    }

    /* 优化触摸体验 */
    button {
        min-height: 44px;
        min-width: 44px;
    }

    /* 优化字体大小 */
    .page-header h1 {
        font-size: 24px;
    }

    .page-header p {
        font-size: 14px;
    }

    .calendar-nav h2 {
        font-size: 16px;
    }


}

@media (max-width: 480px) {
    .museum-calendar {
        padding: 8px;
        margin: 5px;
    }
    
    .calendar-nav {
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px;
    }
    
    .calendar-nav h2 {
        width: 100%;
        text-align: center;
        order: -1;
        font-size: 16px;
    }
    
    .calendar-nav button {
        flex: 1;
        min-width: 40px;
        font-size: 14px;
    }
    
    .view-toggle button {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .search-filter input {
        padding: 12px;
        font-size: 16px;
    }
    
    .weekdays {
        gap: 5px;
    }
    
    .weekday {
        padding: 6px;
        font-size: 12px;
    }
    
    .days {
        gap: 5px;
    }
    
    .day {
        font-size: 12px;
        padding: 8px;
        min-height: 60px;
    }

    .months-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 8px;
    }

    .month-card {
         padding: 10px;
    }

    .month-card h3 {
        font-size: 20px;
    }

    .exhibition-count {
        font-size: 12px;
    }

    .month-days {
        gap: 2px;
        font-size: 10px;
    }

    .exhibition-item h4 {
        font-size: 14px;
    }

    .exhibition-item p {
        font-size: 13px;
    }



    .today-exhibition-item p {
        font-size: 12px;
    }

    /* 优化触摸图标大小 */
    .day,
    .month-day,
    .month-card {
        min-height: 60px;
    }

    /* 优化面板显示 */
    .exhibition-panel {
        width: 100%;
        max-width: 100%;
    }

    .panel-header {
        padding: 16px;
    }

    .exhibition-list {
        padding: 16px;
    }
}

@media (max-width: 360px) {
    .day {
        font-size: 11px;
        padding: 4px;
        min-height: 45px;
    }

    .month-card {
        padding: 8px;
    }

    .month-card h3 {
        font-size: 16px;
    }

    .exhibition-count {
        font-size: 11px;
    }

    .calendar-nav button {
        font-size: 12px;
        padding: 6px 8px;
    }

    .view-toggle button {
        padding: 8px 12px;
        font-size: 12px;
    }
}