body {
  margin: 0;
  padding: 0;
  font-family: 'Hind', sans-serif;
  line-height: 1.6;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
.header {
  text-align: center;
  padding: 2rem 0;
}
h1 {
  margin-top: 0;
}

/* Fix for duplicate footers in blog panel */
.content-wrapper footer.footer,
.blog-panel footer.footer,
.flex-container > footer.footer {
    display: none;
}

/* Only show footer at the bottom of the container */
.container > footer.footer {
    display: block;
}

/* Dark mode toggle styles */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}
.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 50px;
    margin: 0 10px;
}
.theme-switch input {
    display: none;
}
.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}
.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
}
input:checked + .slider {
    background-color: #f1780e;
}
input:checked + .slider:before {
    transform: translateX(26px);
}
.slider.round {
    border-radius: 34px;
}
.slider.round:before {
    border-radius: 50%;
}

/* Ensure slot machine is always visible */
.slot-machine-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Dark mode colors */
body.dark-mode {
    background-color: #1a1a1a;
    color: #f5f5f5;
}
body.dark-mode .header .content h1,
body.dark-mode .header .content p {
    color: #f5f5f5;
}

/* Certificate section styles */
.certificate-section {
    margin-top: 20px;
}

.certificate-section h4 {
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
    color: #333;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.certificate-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.certificate-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.certificate-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.certificate-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.certificate-details {
    color: #7f8c8d;
    font-size: 0.9em;
}

body.dark-mode .certificate-item {
    background-color: #2d2d2d;
    border-color: #444;
}

body.dark-mode .certificate-name {
    color: #e0e0e0;
}

body.dark-mode .certificate-details {
    color: #aaa;
}
body.dark-mode #myTabContent {
    background-color: #2a2a2a;
}
body.dark-mode .blog-section-content h3 a {
    color: #f1780e;
}
body.dark-mode .blog-section-content p {
    color: #dddddd;
}
body.dark-mode .message-board, 
body.dark-mode .meeting-scheduler {
    background-color: #333;
    color: #f5f5f5;
}
body.dark-mode .message {
    background-color: #444;
    color: #f5f5f5;
}
body.dark-mode pre code {
    background-color: #2d2d2d;
    color: #f5f5f5;
}
body.dark-mode #aiml-blog-list li,
body.dark-mode #blog-list li {
    background-color: #333;
    box-shadow: 0 1px 6px rgba(255,255,255,0.1);
}
body.dark-mode #aiml-blog-list li:hover,
body.dark-mode #blog-list li:hover {
    background-color: #444;
    box-shadow: 0 4px 18px rgba(241,120,14,0.2), 0 1.5px 8px rgba(255,255,255,0.1);
}
body.dark-mode .message-content {
    color: #f5f5f5;
}

/* RSS Dropdown Styling */
.dropdown-menu {
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 8px 0;
}
.dropdown-item {
    padding: 8px 20px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
}
.dropdown-item:hover {
    background-color: #f8f9fa;
}
body.dark-mode .dropdown-menu {
    background-color: #2a2a2a;
    border-color: rgba(255,255,255,0.1);
}
body.dark-mode .dropdown-item {
    color: #f5f5f5;
}
body.dark-mode .dropdown-item:hover {
    background-color: #3a3a3a;
}
body.dark-mode .dropdown-divider {
    border-top-color: rgba(255,255,255,0.1);
}

.blog-share-buttons {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

#page-top #main-wrapper .columns-block .left-col-block.blocks .header .content.text-center .lead a {
    color: #FF8040;
}
#page-top #main-wrapper .columns-block .left-col-block.blocks .header .content.text-center p strong a {
    color: #FF8040;
}
.nav-tabs .nav-item .nav-link {
    font-size: 24px;
    font-weight: bold;
}
.tab-pane {
    padding: 0 !important;
    margin: 0 !important;
}
.section-wrapper {
    padding: 0 !important;
    margin: 0 !important;
}
.section-title {
    margin: 0 !important;
    padding: 0 !important;
}
.container-fluid {
    padding: 0 !important;
    margin: 0 !important;
}
.row {
    padding: 0 !important;
    margin: 0 !important;
}
.col-md-12 {
    padding: 0 !important;
    margin: 0 !important;
}
h2, h3, p {
    margin: 0 !important;
    padding: 0 !important;
}
.header .content h1, .header .content p {
    text-align: center;
}
.blog-section-title {
    text-align: left;
    color: #f1780e;
    font-weight: bold;
    margin-bottom: 20px;
}
.blog-section-content ul {
    list-style: none;
    padding: 0;
}
.blog-section-content ul li {
    margin-bottom: 20px;
}
.blog-section-content h3 a {
    color: #6b6968;
    font-weight: bold;
}
.blog-section-content h4 a {
    color: #0565dc;
    font-weight: bold;
    font-size: 1.2em;
}
.blog-section-content p {
    font-size: 1.2em;
}
.profile-img {
    width: 100%;
    height: 500px; /* Increased from 100px */
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}
.profile-img video {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    object-fit: cover;
    background: #05070d;
    transition: opacity 1s ease;
}
.profile-img video.active {
    opacity: 1;
    z-index: 1; /* Add z-index to ensure active image is on top */
}
.meeting-scheduler {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}
.calendly-inline-widget {
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
body.dark-mode .calendly-inline-widget {
    background: #2d2d2d;
}
body.dark-mode #calendly-container {
    background: #2d2d2d;
}

#map {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: #f8f9fa;
}

.map-error {
    padding: 20px;
    text-align: center;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
}

.meeting-button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #0565dc;
    color: white !important;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 10px 0;
}

.meeting-button:hover {
    background-color: #0451b0;
    text-decoration: none;
}

.meeting-button i {
    margin-right: 8px;
}

.text-muted {
    color: #6c757d;
}

.mt-2 {
    margin-top: 0.5rem;
}

.message-board {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.message-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.message-button {
    background-color: #0565dc;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.message-button:hover {
    background-color: #0451b0;
}

.messages-container {
    margin-top: 30px;
}

.message {
    background: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9em;
}

.message-content {
    color: #333;
    line-height: 1.5;
}

.message-date {
    color: #999;
    font-size: 0.8em;
}

.visitor-counter {
    text-align: center;
    margin: 20px 0;
    font-size: 1.2em;
    color: #f1780e;
}

.visitor-counter span {
    font-weight: bold;
    color: #0565dc;
}

.visitor-text {
    font-size: 1.2em;
    color: #f1780e;
    display: block;
    margin-top: 20px;
}

.visitor-number {
    color: #f1780e;
    font-weight: bold;
    font-size: 1.3em;
}

.resource-link {
    margin-top: 20px;
}

.resource-link .btn {
    background-color: #f1780e;
    border-color: #f1780e;
}

.resource-link .btn:hover {
    background-color: #d66a0a;
    border-color: #d66a0a;
}

.gallery-container {
    margin: 20px 0;
}

.gallery-container .profile-img {
    width: 100%;
    height: 600px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gallery-description {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-style: italic;
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.gallery-item {
    width: calc(33.33% - 20px);
    margin: 10px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 0 0 8px 8px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .caption {
    transform: translateY(0);
}

.gallery-item img {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 90vh;
}

.close {
    position: absolute;
    right: 35px;
    top: 25px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Responsive adjustments */
@media only screen and (max-width: 700px) {
    .modal-content {
        max-width: 95%;
    }
}

.code-block {
    margin: 15px 0;
}

.code-block pre {
    background-color: #1e1e1e; /* 深色背景 */
    color: #ffffff; /* 白色文字 */
    border-left: 4px solid #f1780e;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* 代码高亮的基本颜色 */
.code-block .keyword { color: #569cd6; }  /* 关键字蓝色 */
.code-block .string { color: #ce9178; }   /* 字符串褐色 */
.code-block .comment { color: #6a9955; }  /* 注释绿色 */
.code-block .function { color: #dcdcaa; } /* 函数名黄色 */
.code-block .number { color: #b5cea8; }   /* 数字浅绿色 */

/* 美化AI/ML filter下拉框 */
#aiml-filter {
    padding: 6px 16px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    font-size: 1.1em;
    background: #fff;
    color: #333;
    margin-bottom: 18px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#aiml-filter:focus, #aiml-filter:hover {
    border-color: #f1780e;
    box-shadow: 0 2px 12px rgba(241,120,14,0.13);
    outline: none;
}
#aiml-filter-label {
    font-weight: bold;
    margin-right: 10px;
    color: #f1780e;
    font-size: 1.1em;
}
#aiml-search-box {
    padding: 6px 16px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    font-size: 1.1em;
    background: #fff;
    color: #333;
    margin-bottom: 12px;
    margin-right: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 220px;
    max-width: 90vw;
}
#aiml-search-box:focus, #aiml-search-box:hover {
    border-color: #f1780e;
    box-shadow: 0 2px 12px rgba(241,120,14,0.13);
    outline: none;
}
#aiml-reset-btn {
    padding: 6px 18px;
    border-radius: 6px;
    border: none;
    background: #f1780e;
    color: #fff;
    font-size: 1em;
    margin-left: 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(241,120,14,0.07);
    transition: background 0.2s, box-shadow 0.2s;
}
#aiml-reset-btn:hover {
    background: #d66a0a;
    box-shadow: 0 2px 12px rgba(241,120,14,0.13);
}

/* Social sharing buttons */
.blog-share-buttons {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}
.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.share-btn.twitter {
    background-color: #1DA1F2;
}
.share-btn.linkedin {
    background-color: #0077B5;
}
.share-btn.email {
    background-color: #f1780e;
}
body.dark-mode .share-btn.email {
    background-color: #ff9d45;
}
#aiml-filter option[data-badge]:after {
    content: attr(data-badge);
    background: #f1780e;
    color: #fff;
    border-radius: 10px;
    padding: 2px 7px;
    margin-left: 8px;
    font-size: 0.9em;
}
#aiml-blog-list li,
#blog-list li {
    opacity: 1;
    transition: opacity 0.35s, box-shadow 0.2s;
    border-radius: 8px;
    margin-bottom: 18px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    padding: 12px 18px 10px 18px;
    position: relative;
}
#aiml-blog-list li.fading-out,
#blog-list li.fading-out {
    opacity: 0;
    pointer-events: none;
}
#aiml-blog-list li.fading-in,
#blog-list li.fading-in {
    opacity: 1;
}
#aiml-blog-list li:hover,
#blog-list li:hover {
    box-shadow: 0 4px 18px rgba(241,120,14,0.13), 0 1.5px 8px rgba(0,0,0,0.07);
    background: #fffbe9;
    z-index: 2;
}

/* 统一所有博客列表的样式 */
.blog-section-content ul li {
    opacity: 1;
    transition: opacity 0.35s, box-shadow 0.2s;
    border-radius: 8px;
    margin-bottom: 18px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    padding: 12px 18px 10px 18px;
    position: relative;
}
.blog-section-content ul li:hover {
    box-shadow: 0 4px 18px rgba(241,120,14,0.13), 0 1.5px 8px rgba(0,0,0,0.07);
    background: #fffbe9;
    z-index: 2;
}

/* 统一所有博客列表的暗色模式样式 */
body.dark-mode .blog-section-content ul li {
    background-color: #333;
    box-shadow: 0 1px 6px rgba(255,255,255,0.1);
}
body.dark-mode .blog-section-content ul li:hover {
    background-color: #444;
    box-shadow: 0 4px 18px rgba(241,120,14,0.2), 0 1.5px 8px rgba(255,255,255,0.1);
}
body.dark-mode .blog-section-content h3 a {
    color: #f1780e;
}
body.dark-mode .blog-section-content p {
    color: #cccccc;
}
body.dark-mode .section-title {
    color: #f5f5f5;
}
body.dark-mode .blog-section-title {
    color: #f1780e;
}
body.dark-mode .tab-pane {
    background-color: #2a2a2a;
}

body.dark-mode .message-content {
    color: #f5f5f5;
}

/* Roulette wheel dark mode styles */
body.dark-mode #fun .section-title {
    color: #f5f5f5;
}

body.dark-mode #fun p {
    color: #f5f5f5;
}

body.dark-mode #fun div[style*="background-color: #f8f9fa"] {
    background-color: #333 !important;
    color: #f5f5f5;
}

body.dark-mode #fun h3 {
    color: #f1780e;
}

body.dark-mode #slot-display {
    background-color: #333 !important;
    border-color: #f1780e !important;
}

body.dark-mode .slot-column {
    border-color: #555 !important;
}

body.dark-mode .slot-machine-container {
    background: linear-gradient(135deg, #4a1a70, #933600) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
}

body.dark-mode #slot-display {
    background-color: rgba(40, 40, 40, 0.9) !important;
}

body.dark-mode .slot-cell {
    border-color: #444 !important;
}

body.dark-mode .slot-row {
    border-color: #444 !important;
}

@media (max-width: 600px) {
    #aiml-search-box { width: 100%; margin-bottom: 10px; }
    #aiml-reset-btn { width: 100%; margin: 10px 0 10px 0; }
    #roulette-canvas { width: 100%; height: auto; }
}

section[id], h2[id], h3[id] {
  scroll-margin-top: 80px;
}

.nav-tabs {
  position: fixed; /* 或 sticky */
  top: 0;
  width: 100%;
  z-index: 1000;
}
