:root {
    --primary-color: #4d6de3;
    --primary-dark: #3451c7;
    --primary-light: #7b8fe8;
    --secondary-color: #FF7D5C;
    --secondary-dark: #e85f3e;
    --accent-color: #3BD2AE;
    --light-bg: #f3f6fd;
    --dark-bg: #292D52;
    --text-color: #313854;
    --text-light: #7885AD;
    --white: #ffffff;
    --gray-light: #eef2f9;
    --gray: #d9e0f2;
    --box-shadow: 0 5px 20px rgba(77, 109, 227, 0.15);
    --hover-shadow: 0 8px 30px rgba(77, 109, 227, 0.25);
    --calendar-height: 650px;
}

/* Base styles */
body {
    font-family: 'Noto Sans SC', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    box-shadow: 0 2px 15px rgba(77, 109, 227, 0.2);
    padding: 12px 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand img {
    height: 30px;
    width: auto;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav .nav-link.active {
    color: var(--primary-color);
    background-color: var(--white);
}

/* Hero section */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
    background-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    color: var(--white);
}

.hero-circles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.hero-circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -50px;
}

.hero-circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: 10%;
}

.hero-circle-3 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 20%;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Logo animation */
.logo-animation {
    position: relative;
    display: inline-block;
    animation: float 6s ease-in-out infinite;
}

.logo-animation::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 10px;
    bottom: -15px;
    left: 10%;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.1);
    filter: blur(5px);
    animation: shadow 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes shadow {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

/* Search container */
.search-container {
    position: relative;
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-container .form-control {
    padding-left: 45px;
    height: 50px;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.search-container .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-container .form-control:focus {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: var(--white);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.search-container .search-icon {
    position: absolute;
    left: 18px;
    top: 16px;
    color: var(--white);
}

/* Breadcrumbs */
.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: white;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.6);
}

/* Section styling */
.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 25px;
    color: var(--text-color);
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 50px;
    background-color: var(--secondary-color);
}

.content-section {
    padding: 4rem 0;
}

.content-section.bg-white {
    background-color: var(--white);
}

/* Cards */
.calendar-container, .filter-card, .holiday-list, .holidays-list-card, .holiday-detail-card, .related-holidays {
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.calendar-container:hover, .filter-card:hover, .holiday-list:hover, .holidays-list-card:hover, .holiday-detail-card:hover, .related-holidays:hover {
    box-shadow: var(--hover-shadow);
}

.holiday-detail-card {
    padding: 30px;
}

.info-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    height: 100%;
    border: none;
}

.info-card:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-5px);
}

.info-card .card-body {
    padding: 1.8rem;
}

.info-card .card-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.info-card .card-title i {
    color: var(--secondary-color);
}

.info-card .card-text {
    color: var(--text-color);
    line-height: 1.7;
}

/* Calendar styles */
#calendar {
    height: var(--calendar-height);
}

.fc .fc-toolbar-title {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 600;
}

.fc .fc-button-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.fc .fc-button-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.fc .fc-button-primary:disabled {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

.fc .fc-daygrid-day.fc-day-today {
    background-color: rgba(77, 109, 227, 0.1);
}

.fc .fc-col-header-cell {
    background-color: var(--gray-light);
}

.fc-theme-standard td, .fc-theme-standard th {
    border-color: var(--gray);
}

.fc .fc-daygrid-day-number {
    padding: 8px 12px;
    color: var(--text-color);
}

.fc-event {
    cursor: pointer;
    border-radius: 6px;
    border: none;
    padding: 3px;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.fc-event:hover {
    transform: translateY(-2px);
}

.fc-event-title {
    font-weight: 500;
    padding: 3px 6px;
}

.fc-daygrid-event-dot {
    border-color: var(--secondary-color) !important;
}

/* Filter styles */
.filter-card h4, .holiday-list h4, .related-holidays h4 {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.2rem;
}

.filter-group .form-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.7rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.filter-btn {
    flex: 1 0 auto;
    min-width: 90px;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: var(--gray-light);
    border: 1px solid var(--gray);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn:hover {
    background-color: rgba(77, 109, 227, 0.1);
    border-color: var(--primary-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.form-select, .form-control {
    border-radius: 6px;
    border-color: var(--gray);
    color: var(--text-color);
    padding: 10px 15px;
    background-color: var(--gray-light);
    font-weight: 500;
}

.form-select:focus, .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(77, 109, 227, 0.25);
}

.btn-outline-secondary {
    border-color: var(--text-light);
    color: var(--text-light);
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-outline-secondary:hover {
    background-color: var(--text-light);
    border-color: var(--text-light);
    color: var(--white);
}

/* Holiday list styles */
.holiday-list {
    max-height: 600px;
    overflow-y: auto;
}

.holiday-list h5 {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-color);
}

.holiday-item {
    padding: 12px 18px;
    border-bottom: 1px solid var(--gray);
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-bottom: 8px;
}

.holiday-item:hover {
    background-color: var(--gray-light);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.holiday-item:last-child {
    border-bottom: none;
}

.holiday-name {
    color: var(--text-color);
    font-size: 1.05rem;
}

.holiday-item .holiday-date {
    display: inline-block;
    color: #888;
    font-size: 0.9em;
}

.holiday-category {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    margin-right: 5px;
    font-weight: 500;
}

.holiday-category.public {
    background-color: rgba(59, 210, 174, 0.2);
    color: #25a085;
}

.holiday-category.traditional {
    background-color: rgba(77, 109, 227, 0.2);
    color: var(--primary-color);
}

.holiday-category.religious {
    background-color: rgba(255, 125, 92, 0.2);
    color: var(--secondary-dark);
}

.holiday-country {
    display: inline-block;
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    background-color: rgba(77, 109, 227, 0.1);
    color: var(--primary-color);
    font-weight: 500;
    margin-right: 0.5rem;
}

.country-flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Holiday detail styles */
.holiday-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray);
}

.holiday-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.holiday-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.holiday-meta-item {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-light);
}

.holiday-meta-item i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.holiday-category-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background-color: rgba(77, 109, 227, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 1rem;
}

.holiday-section {
    margin-bottom: 2rem;
}

.holiday-section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-light);
}

.holiday-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.holiday-tradition-list {
    padding-left: 1.2rem;
}

.holiday-tradition-list li {
    margin-bottom: 1rem;
    position: relative;
}

.holiday-tradition-list li::marker {
    color: var(--primary-color);
}

.holiday-images {
    margin-top: 2rem;
}

.holiday-images img {
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
}

.holiday-images img:hover {
    transform: scale(1.02);
    box-shadow: var(--hover-shadow);
}

/* Related holidays */
.related-holiday-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray);
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-bottom: 8px;
    display: block;
    text-decoration: none;
    color: var(--text-color);
}

.related-holiday-item:hover {
    background-color: var(--gray-light);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.related-holiday-item:last-child {
    border-bottom: none;
}

.related-holiday-name {
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 1.05rem;
}

.related-holiday-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Share buttons */
.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.share-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
}

.share-button:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Loading styles */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #777;
}

.loading-spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.skeleton-loader {
    height: 15px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-placeholder {
    display: inline-block;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

.loading-placeholder::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0) 100%);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.actual-title {
    display: none;
}

/* Month list styling for country-holidays.html */
.holiday-month-section {
    margin-bottom: 30px;
}

.month-header {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray);
}

.no-holidays-message {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Footer styles */
footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 3rem 0 2rem;
}

footer h5 {
    font-weight: 600;
    margin-bottom: 1.2rem;
    color: var(--white);
}

footer .small {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

footer a {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: color 0.2s;
    text-decoration: none;
}

footer a:hover {
    color: var(--white) !important;
}

footer ul li {
    margin-bottom: 0.7rem;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}

footer .social-icons {
    display: flex;
    gap: 1rem;
}

footer .social-icons a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

footer .social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    #calendar {
        font-size: 0.9rem;
        min-height: 500px;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        margin-bottom: 5px;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .holiday-title {
        font-size: 1.8rem;
    }
    
    .holiday-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .holiday-detail-card {
        padding: 20px;
    }
    
    .holiday-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .holiday-item .holiday-date {
        margin-top: 8px;
    }
}

/* Dynamic Holiday Cards */
.dynamic-holiday-card {
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid var(--gray);
    overflow: hidden;
    height: 100%;
    background-color: var(--white);
}

.dynamic-holiday-card:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-5px);
    border-color: var(--primary-light);
}

.dynamic-holiday-card .card-title {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.dynamic-holiday-card .card-text {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Region Holiday Links */
.region-holiday-link {
    text-decoration: none;
    display: block;
    width: 100%;
}

.region-holiday-item {
    background-color: var(--gray-light);
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.region-holiday-item:hover {
    background-color: var(--primary-light);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(77, 109, 227, 0.2);
}

.region-holiday-name {
    font-weight: 500;
    color: var(--text-color);
}

.region-holiday-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.region-holiday-item:hover .region-holiday-name,
.region-holiday-item:hover .region-holiday-date {
    color: var(--white);
}

/* Related Culture Content */
#relatedCultureContent p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dynamic-holiday-card .card-title {
        font-size: 1rem;
    }
    
    .region-holiday-item {
        padding: 10px 12px;
    }
    
    .region-holiday-name {
        font-size: 0.9rem;
    }
    
    .region-holiday-date {
        font-size: 0.8rem;
    }
}

/* 增强日历顶部工具栏响应式表现 */
@media (max-width: 768px) {
    /* 减小日历标题大小并调整样式 */
    .fc .fc-toolbar-title {
        font-size: 1.1rem !important;
        line-height: 1.2;
        padding: 0 5px;
        text-align: center;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    /* 减小按钮尺寸并调整样式 */
    .fc .fc-button {
        padding: 0.2rem 0.5rem !important;
        font-size: 0.8rem !important;
        line-height: 1.2;
    }
    
    /* 调整工具栏布局间距 */
    .fc .fc-toolbar.fc-header-toolbar {
        margin-bottom: 0.8rem;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    /* 提升工具栏按钮的点击区域 */
    .fc .fc-button {
        min-width: 40px;
        min-height: 32px;
    }

    /* 确保工具栏分区在小屏幕也能正常排列 */
    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        margin: 0 5px;
    }
    
    /* 调整按钮组间距 */
    .fc .fc-button-group {
        gap: 3px;
    }
    
    /* 确保日历正常高度 */
    #calendar {
        min-height: 450px;
    }
}

/* 针对超小屏幕的额外优化 */
@media (max-width: 375px) {
    .fc .fc-toolbar-title {
        font-size: 1rem !important;
    }
    
    .fc .fc-button {
        padding: 0.15rem 0.4rem !important;
        font-size: 0.75rem !important;
    }
    
    .fc .fc-toolbar.fc-header-toolbar {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .fc-toolbar-chunk {
        margin: 5px 0;
    }
}

/* 移动设备工具栏优化 */
.fc-toolbar.mobile-optimized {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.fc-toolbar.mobile-optimized .fc-toolbar-chunk {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0;
}

/* 确保按钮组在最窄屏幕能保持在一行 */
.fc-toolbar.mobile-optimized .fc-button-group {
    display: flex;
    flex-wrap: nowrap;
}

/* 当屏幕宽度小于 375px 时应用特殊样式 */
@media (max-width: 375px) {
    .fc-header-toolbar.fc-toolbar {
        padding: 0 !important;
    }
    
    /* 微调按钮间距 */
    .fc-toolbar.mobile-optimized .fc-toolbar-chunk:not(.fc-toolbar-chunk:nth-child(2)) {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: 0 5px;
    }
    
    /* 单独处理标题的样式 */
    .fc-toolbar.mobile-optimized .fc-toolbar-chunk:nth-child(2) {
        order: -1;
        margin-bottom: 8px;
    }
    
    /* 简化日历列表视图下的日期显示 */
    .fc-list-day-cushion {
        padding: 6px 8px !important;
    }
    
    .fc-list-day-text, .fc-list-day-side-text {
        font-size: 0.9rem;
    }
}

/* 隐藏列表视图中的全天列 */
.fc-list-event-time {
    display: none !important;
}

.country-link {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px dashed var(--text-light);
}

.country-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
} 