body {
    font-family: sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top */
    min-height: 100vh;
}

.container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 800px;
}

/* 标题容器样式 */
.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 20px;
    position: relative;
    gap: 5px; /* 标题和开关之间的间距 */
    flex-wrap: nowrap;
}

h1 {
    color: #333;
    margin: 0;
    padding: 0;
    display: inline-block;
    font-size: 28px; /* 调整标题大小以便与开关协调 */
}

/* Daily Sentence */
.daily-sentence {
    text-align: center;
    margin: 0 auto 30px auto;
    padding: 15px;
    border-radius: 8px;
    background-color: #f9f9f9;
    max-width: 80%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.daily-sentence .sentence {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
}

.daily-sentence .translation {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 8px;
}

.daily-sentence .date,
.daily-sentence .source {
    font-size: 0.9em;
    color: #777;
    margin-top: 5px;
}

.daily-sentence .intro-message {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
}

.daily-sentence .cached-info {
    font-size: 0.8em;
    color: #999;
    font-style: italic;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #eee;
}

.daily-sentence .error {
    color: #e53e3e;
    font-weight: 500;
}

/* Level Selection */
.level-selection {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px; /* Add gap for better spacing */
}

.level-btn {
    background-color: transparent;
    border: 2px solid #e1e1e1;
    color: #333;
    font-weight: 500;
    padding: 10px 16px;
    margin: 0; /* Remove margin since we're using gap */
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.level-btn.active {
    background-color: #4361ee;
    color: white;
    border-color: #4361ee;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    transform: translateY(-2px);
}

.level-btn:hover:not(.active) {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
}

.level-btn:active:not(.active) {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Word List Container */
.word-list-container {
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.word-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.word-list-header h3 {
    margin: 0;
    font-size: 1.1em;
}

.word-list-tabs button {
    background: none;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    color: #666;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.word-list-tabs button::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 50%;
    background-color: #4361ee;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 5px;
}

.word-list-tabs button.active {
    color: #4361ee;
}

.word-list-tabs button.active::after {
    width: 70%;
}

.word-list-tabs button:hover:not(.active) {
    color: #333;
}

.word-list-tabs button:hover::after {
    width: 40%;
}

.word-list-content {
    max-height: 500px; /* 增加高度以匹配新的容器 */
    overflow-y: auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.word-list {
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.word-item {
    background-color: #fff;
    border: 1px solid #ddd; /* Add default light border */
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out; /* Add transition */
    position: relative; /* Needed for absolute positioning of buttons */
    
    /* 禁用文本选择 */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.word-item:hover {
    background-color: #f9f9f9;
}

/* 调整选中样式，变得不那么突兀 */
.word-item.selected {
    background-color: #f6f9fc; /* 非常浅的蓝色背景 */
    border: 1px solid #90caf9; /* 更柔和的蓝色边框 */
    box-shadow: 0 0 3px rgba(33, 150, 243, 0.3); /* 添加微妙的蓝色阴影 */
}

/* 为单词头部添加选中指示器而不是整个卡片 */
.word-item.selected .word-head::before {
    content: ''; 
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: #2196f3;
    border-radius: 4px 0 0 4px;
}

.word-item .word-head {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 6px;
    color: #333;
    padding-right: 30px; /* 给收藏按钮留出空间 */
    pointer-events: none; /* 禁止鼠标直接点击文字 */
}

.word-item .word-translation {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
    max-width: 80%; /* 防止文本太长 */
    word-break: break-word; /* 确保长单词也能换行 */
    pointer-events: none; /* 禁止鼠标直接点击文字 */
}

.word-item .favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.4em; /* 加大字体 */
    cursor: pointer;
    color: #aaa; /* 更深的默认颜色 */
    text-shadow: 0 1px 2px rgba(0,0,0,0.1); /* 添加阴影使其更明显 */
    transition: color 0.2s ease, transform 0.2s ease;
}

.word-item .favorite-btn.favorited {
    color: #ff3d3d; /* 更深的红色星星 */
    text-shadow: 0 1px 3px rgba(255,61,61,0.3); /* 添加发光效果 */
    transform: scale(1.1); /* 略微放大 */
}

.word-item .favorite-btn:hover {
    color: #ff7070; /* 鼠标悬停时的颜色 */
    transform: scale(1.15);
}

.word-item.favorited {
    background-color: #ffebee; /* Light red background */
    border-color: #ff5252;
}

.word-item.reviewed {
    background-color: #fff9c4; /* Light yellow background */
}

.word-item.reviewed .word-head {
    color: #333; /* Keep text readable */
    text-decoration: none; /* Remove line-through */
}

.word-item.reviewed .word-translation {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.empty-message {
    text-align: center;
    padding: 20px;
    color: #888;
}

.word-list-actions {
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    text-align: right;
}

.controls {
    padding: 15px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.action-btn {
    color: #090909;
    padding: 0.7em 1.7em;
    font-size: 18px;
    border-radius: 0.5em;
    background: #e8e8e8;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    transition: all 0.3s;
    box-shadow: 6px 6px 12px #c5c5c5, -6px -6px 12px #ffffff;
    margin: 5px;
}

.action-btn:active {
    color: #666;
    box-shadow: inset 4px 4px 12px #c5c5c5, inset -4px -4px 12px #ffffff;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.action-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.7;
}

#toggle-reviewed, #start-review, #check-duplicates, #resetReviewedBtn, #clearFavoritesBtn {
    background: #e8e8e8;
    color: #090909;
}

/* Audio Control */
#audio-control {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

#audio-control button {
  --border-color: linear-gradient(-45deg, #ffae00, #7e03aa, #00fffb);
  --border-width: 0.125em;
  --curve-size: 0.5em;
  --blur: 30px;
  --bg: #080312;
  --color: #afffff;
  color: var(--color);
  cursor: pointer;
  /* use position: relative; so that BG is only for button */
  position: relative;
  isolation: isolate;
  display: inline-grid;
  place-content: center;
  padding: 0.5em 1.5em;
  font-size: 17px;
  border: 0;
  text-transform: uppercase;
  box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.6);
  clip-path: polygon(
    /* Top-left */ 0% var(--curve-size),
    var(--curve-size) 0,
    /* top-right */ 100% 0,
    100% calc(100% - var(--curve-size)),
    /* bottom-right 1 */ calc(100% - var(--curve-size)) 100%,
    /* bottom-right 2 */ 0 100%
  );
  transition: color 250ms;
}

#audio-control button::after,
#audio-control button::before {
  content: "";
  position: absolute;
  inset: 0;
}

#audio-control button::before {
  background: var(--border-color);
  background-size: 300% 300%;
  animation: move-bg7234 5s ease infinite;
  z-index: -2;
}

@keyframes move-bg7234 {
  0% {
    background-position: 31% 0%;
  }

  50% {
    background-position: 70% 100%;
  }

  100% {
    background-position: 31% 0%;
  }
}

#audio-control button::after {
  background: var(--bg);
  z-index: -1;
  clip-path: polygon(
    /* Top-left */ var(--border-width)
      calc(var(--curve-size) + var(--border-width) * 0.5),
    calc(var(--curve-size) + var(--border-width) * 0.5) var(--border-width),
    /* top-right */ calc(100% - var(--border-width)) var(--border-width),
    calc(100% - var(--border-width))
      calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)),
    /* bottom-right 1 */
      calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5))
      calc(100% - var(--border-width)),
    /* bottom-right 2 */ var(--border-width) calc(100% - var(--border-width))
  );
  transition: clip-path 500ms;
}

#audio-control button:where(:hover, :focus)::after {
  clip-path: polygon(
    /* Top-left */ calc(100% - var(--border-width))
      calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)),
    calc(100% - var(--border-width)) var(--border-width),
    /* top-right */ calc(100% - var(--border-width)) var(--border-width),
    calc(100% - var(--border-width))
      calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)),
    /* bottom-right 1 */
      calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5))
      calc(100% - var(--border-width)),
    /* bottom-right 2 */
      calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5))
      calc(100% - var(--border-width))
  );
  transition: 200ms;
}

#audio-control button:where(:hover, :focus) {
  color: #fff;
}

/* Navigation */
.navigation {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.navigation button {
    background-color: #805ad5;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(128, 90, 213, 0.2);
}

.navigation button:hover {
    background-color: #6b46c1;
    box-shadow: 0 6px 18px rgba(128, 90, 213, 0.3);
    transform: translateY(-2px);
}

.navigation button:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(128, 90, 213, 0.2);
}

#toggle-answer {
    background-color: #f6ad55;
    box-shadow: 0 4px 12px rgba(246, 173, 85, 0.3);
}

#toggle-answer:hover {
    background-color: #ed8936;
    box-shadow: 0 6px 18px rgba(246, 173, 85, 0.4);
    transform: translateY(-2px);
}

#exit-review {
    background-color: #f56565;
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.3);
}

#exit-review:hover {
    background-color: #e53e3e;
    box-shadow: 0 6px 18px rgba(245, 101, 101, 0.4);
    transform: translateY(-2px);
}

/* Difficulty Buttons */
.difficulty-buttons {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.difficulty-btn {
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid;
    min-width: 80px;
}

/* Specific difficulty button styles */
#again { 
    border-color: #f56565; 
    color: #f56565; 
    background-color: rgba(245, 101, 101, 0.05);
}

#hard { 
    border-color: #f6ad55; 
    color: #f6ad55; 
    background-color: rgba(246, 173, 85, 0.05);
}

#good { 
    border-color: #48bb78; 
    color: #48bb78; 
    background-color: rgba(72, 187, 120, 0.05);
}

#easy { 
    border-color: #4299e1; 
    color: #4299e1; 
    background-color: rgba(66, 153, 225, 0.05);
}

/* Hover effects */
#again:hover { 
    background-color: #f56565; 
    color: white; 
    box-shadow: 0 5px 15px rgba(245, 101, 101, 0.3);
    transform: translateY(-3px);
}

#hard:hover { 
    background-color: #f6ad55; 
    color: white; 
    box-shadow: 0 5px 15px rgba(246, 173, 85, 0.3);
    transform: translateY(-3px);
}

#good:hover { 
    background-color: #48bb78; 
    color: white; 
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.3);
    transform: translateY(-3px);
}

#easy:hover { 
    background-color: #4299e1; 
    color: white; 
    box-shadow: 0 5px 15px rgba(66, 153, 225, 0.3);
    transform: translateY(-3px);
}

.difficulty-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Card - Flip Card Implementation */
:root {
    /* Default gradient colors - will be overridden by JavaScript */
    --front-gradient-1: bisque;
    --front-gradient-2: rgb(255, 231, 222);
    --front-gradient-3: rgb(255, 211, 195);
    --front-gradient-4: rgba(255, 127, 80, 0.603);
    
    --back-gradient-1: rgb(255, 174, 145);
    --back-gradient-2: coral;
    --back-gradient-3: bisque;
    --back-gradient-4: rgb(255, 185, 160);
}

.card {
    background-color: transparent;
    border: none;
    height: 500px; /* Fixed height */
    width: 100%;
    max-width: 400px; /* Fixed max-width */
    margin: 0 auto;
    perspective: 1000px;
    font-family: sans-serif;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

#front, #back {
    box-shadow: 0 8px 14px 0 rgba(0,0,0,0.2);
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border: 1px solid coral;
    border-radius: 1rem;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

#front {
    background: linear-gradient(120deg, var(--front-gradient-1) 60%, var(--front-gradient-2) 88%,
        var(--front-gradient-3) 40%, var(--front-gradient-4) 48%);
    color: #333;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#front h2 {
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    max-width: 90%;
    letter-spacing: 0; /* Ensure no extra spacing between characters */
}

/* Ensure Chinese translations stay on a single line */
.chinese-definition {
    white-space: nowrap;
    text-align: center;
    width: 100%;
    overflow: visible;
    letter-spacing: 0; /* Ensure no extra spacing between characters */
}

/* Adjust font size based on text length */
@media screen and (max-width: 480px) {
    #front h2 {
        font-size: 2em;
        white-space: normal; /* Allow wrapping on very small screens */
    }
    
    .card .content .translation {
        font-size: 1.3em;
    }
}

#back {
    background: linear-gradient(120deg, var(--back-gradient-1) 30%, var(--back-gradient-2) 88%,
        var(--back-gradient-3) 40%, var(--back-gradient-4) 78%);
    color: white;
    transform: rotateY(180deg);
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    max-height: 600px;
}

#audio-control {
    position: relative;
    z-index: 3;
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    pointer-events: auto; /* Ensure buttons are clickable */
}

#audio-control button {
    pointer-events: auto; /* Ensure buttons are clickable */
}

/* Adjust title styling for flip cards */
.title {
    font-size: 1.5em;
    font-weight: 900;
    text-align: center;
    margin: 0 0 10px 0;
}

/* Keep phonetic, translation, and example styling for content */
.card .content .phonetic {
    font-size: 0.8em;
    color: #777;
}

.card .content .translation {
    font-size: 1.2em;
    color: #fff;
    margin: 15px 0;
    line-height: 1.4;
}

.card .content .examples-header {
    margin-top: 8px;
    margin-bottom: 5px;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    text-align: left;
    padding: 0 5px;
}

.card .content .example {
    font-size: 1.1em;
    color: #fff;
    margin-top: 8px;
    margin-bottom: 2px;
    line-height: 1.3;
    text-align: left;
    padding: 0 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 正在播放的例句高亮样式 */
.card .content .example.playing {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: bold;
    border-radius: 5px;
    padding: 5px 10px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.card .content .eng-definition {
    font-size: 1.1em;
    color: #eee;
    margin-top: 10px;
    line-height: 1.4;
}

/* Add favorite button styling for the card */
.card .favorite-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #ccc;
    z-index: 10;
    transition: color 0.3s ease;
}

/* Typing test overlay */
#typing-test {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.typing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 1rem;
    animation: overlay-appear 0.3s ease-in forwards;
    z-index: 100;
}

@keyframes overlay-appear {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.typing-container {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 85%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: container-appear 0.4s ease-out forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@keyframes container-appear {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.typing-container p {
    margin-bottom: 20px;
    font-size: 1.3em;
    color: #333;
    font-weight: 500;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
    animation: text-appear 0.6s ease-out forwards;
}

/* 例句样式 */
.example-sentence {
    display: block;
    font-size: 1.5em;
    line-height: 1.5;
    color: #333;
    font-weight: 500;
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes text-appear {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* From Uiverse.io by Praashoo7 - 美化输入框 */
#word-input {
    width: 80%;
    max-width: 400px;
    font-size: 1.5em;
    text-align: center;
    margin: 0 auto 15px auto;
    border: none;
    outline: none;
    border-radius: 15px;
    padding: 1em;
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: inset 2px 5px 10px rgba(0,0,0,0.1);
    transition: 300ms ease-in-out;
    display: block;
}

#word-input:focus {
    transform: scale(1.05);
    box-shadow: 0px 0px 20px rgba(255,255,255,0.8),
             -0px -0px 20px rgba(255,255,255,0.8);
}

.typing-feedback {
    height: 30px;
    font-size: 1.2em;
    margin-top: 15px;
    transition: all 0.3s ease;
    font-weight: bold;
    min-height: 30px;
}

.typing-feedback.correct {
    color: #4caf50;
    animation: feedback-pulse 0.5s ease-in-out;
}

.typing-feedback.incorrect {
    color: #f44336;
    animation: feedback-shake 0.5s ease-in-out;
}

@keyframes feedback-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes feedback-shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.card.blur-content .flip-card-inner {
    filter: blur(1px);
    pointer-events: none;
}

.card .favorite-btn.favorited {
    color: #ff5252; /* Red star */
}

/* Status */
.status {
    margin-top: 15px;
    text-align: right;
    color: #666;
    font-size: 0.9em;
}

/* Media Queries for Responsive Design */
@media screen and (max-width: 768px) {
    .card .content .word-head {
        font-size: 2.8em;
    }
    
    .card .content .translation {
        font-size: 1.5em;
    }
    
    .card .content .eng-definition {
        font-size: 1.2em;
    }
    
    .card .content .example {
        font-size: 1.3em;
        padding: 0 5px;
        margin-top: 2px;
    }
    
    .card .content .example-trans {
        font-size: 1.1em;
        padding: 0 5px;
        margin: 0 0 5px 20px; /* Adjusted for smaller screens */
    }
    
    #front, #back {
        padding: 25px;
    }
    
    .navigation button {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    .difficulty-btn {
        padding: 8px 12px;
        min-width: 60px;
        font-size: 0.9em;
    }
}

@media screen and (max-width: 480px) {
    .card .content .word-head {
        font-size: 2em; /* Even smaller font size on phones */
        margin-bottom: 15px;
        margin-top: 10px;
    }
    
    .card .content {
        font-size: 1.2em;
    }
    
    .card .content .translation {
        font-size: 0.9em;
        margin: 15px 0;
    }
    
    .card .content .eng-definition {
        font-size: 0.8em;
    }
    
    .card .content .example {
        font-size: 0.8em;
        padding: 0 5px;
    }
    
    .card .content .example-trans {
        font-size: 0.8em;
        padding: 0 5px;
    }
    
    #front, #back {
        padding: 20px; /* Reduce padding on small screens */
    }
    
    .navigation button {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    .difficulty-btn {
        padding: 8px 12px;
        min-width: 60px;
        font-size: 0.9em;
    }
}

/* Utility */
.hidden {
    display: none !important;
}

/* Modal */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2em;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 15px;
    overflow-y: auto;
    max-height: calc(80vh - 60px);
}

/* Duplicates List */
.duplicates-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.duplicate-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.duplicate-word-header {
    background-color: #f0f0f0;
    padding: 10px 15px;
    font-weight: bold;
    font-size: 1.1em;
    border-bottom: 1px solid #ddd;
}

.occurrences-list {
    padding: 10px;
}

.occurrence-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

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

.occurrence-category {
    font-size: 0.9em;
    color: #666;
    background-color: #e9ecef;
    padding: 3px 8px;
    border-radius: 4px;
}

.remove-duplicate-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}

.remove-duplicate-btn:hover {
    background-color: #c82333;
}

/* Daily Sentence Button - Gradient Style */
.sentence-btn {
  --clr-font-main: hsla(0 0% 20% / 100);
  --btn-bg-1: hsla(194 100% 69% / 1);
  --btn-bg-2: hsla(217 100% 56% / 1);
  --btn-bg-color: hsla(360 100% 100% / 1);
  --radii: 0.5em;
  cursor: pointer;
  padding: 0.9em 1.4em;
  min-width: 120px;
  min-height: 44px;
  font-size: var(--size, 1rem);
  font-weight: 500;
  transition: 0.8s;
  background-size: 280% auto;
  background-image: linear-gradient(
    325deg,
    var(--btn-bg-2) 0%,
    var(--btn-bg-1) 55%,
    var(--btn-bg-2) 90%
  );
  border: none;
  border-radius: var(--radii);
  color: var(--btn-bg-color);
  box-shadow:
    0px 0px 20px rgba(71, 184, 255, 0.5),
    0px 5px 5px -1px rgba(58, 125, 233, 0.25),
    inset 4px 4px 8px rgba(175, 230, 255, 0.5),
    inset -4px -4px 8px rgba(19, 95, 216, 0.35);
}

.sentence-btn:hover {
  background-position: right top;
}

.sentence-btn:is(:focus, :focus-visible, :active) {
  outline: none;
  box-shadow:
    0 0 0 3px var(--btn-bg-color),
    0 0 0 6px var(--btn-bg-2);
}

@media (prefers-reduced-motion: reduce) {
  .sentence-btn {
    transition: linear;
  }
}

.sentence-btn.loading {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Hide Chinese text by default on the back */
#back .chinese-text {
    display: none;
}

/* Show Chinese text when #back has .chinese-visible class */
#back.chinese-visible .chinese-text {
    display: inline; /* Use inline for spans */
}

#back.chinese-visible .example-trans.chinese-text {
    display: block; /* Use block for divs */
}

/* 下划线单词悬停效果 - 完善版 */
.word-blank {
    position: relative;
    border-bottom: 2px solid #444;
    cursor: help;
    padding: 0 2px;
    margin: 0 2px;
    transition: all 0.2s ease;
}

/* 鼠标悬停时相关样式 */
.word-blank:hover {
    /* 将下划线变成半透明而不是完全透明 */
    border-bottom-color: rgba(67, 97, 238, 0.3);
    /* 添加背景色来增强视觉效果 */
    background-color: rgba(67, 97, 238, 0.05);
}

/* 单词提示框样式 */
.word-blank:hover::after {
    content: attr(data-word);
    position: absolute;
    /* 将提示框置于下划线正上方 */
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    /* 使用渐变背景色使其更现代化 */
    background: linear-gradient(to bottom right, #333, #444);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1000;
    /* 增强阴影效果 */
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    /* 水平方向的最小宽度 */
    min-width: 100%; 
    /* 添加字間距 */
    letter-spacing: 0.5px;
    /* 平滑过渡 */
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    /* 添加微小的变换效果增强用户体验 */
    transform: translateX(-50%) translateY(2px);
    opacity: 0.95;
    /* 添加边框增强对比度 */
    border: 1px solid rgba(255,255,255,0.1);
}

/* 当鼠标移开时的样式变化 */
.word-blank::after {
    content: attr(data-word);
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: linear-gradient(to bottom right, #333, #444);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    min-width: 100%;
    letter-spacing: 0.5px;
    /* 初始状态为不可见 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(255,255,255,0.1);
}

/* 悬停时让提示框变得可见 */
.word-blank:hover::after {
    opacity: 0.95;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Word Search Styles */
.word-search-container {
    margin: 15px auto;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 500px;
}

.word-search-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    position: relative;
}

#word-search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    outline: none;
    background-color: white;
}

#word-search-input:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

#word-search-btn {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
    padding: 0;
    transition: transform 0.2s ease;
}

#word-search-btn:hover {
    transform: scale(1.05);
}

#word-search-btn:active {
    transform: scale(0.95);
}

#word-search-btn i {
    font-size: 20px;
}

.search-results {
    margin-top: 15px;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 600px;
    overflow-y: auto;
    z-index: 100;
    position: relative;
    border: 1px solid #eaeaea;
}

.search-results.hidden {
    display: none;
}

.search-word-result {
    padding: 20px;
}

.search-word-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.search-word-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-pronunciation-btn {
    background: none;
    border: none;
    color: #4361ee;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-pronunciation-btn:hover {
    background-color: rgba(67, 97, 238, 0.1);
    transform: scale(1.1);
}

[data-theme="dark"] .search-pronunciation-btn {
    color: #6d8eff;
}

[data-theme="dark"] .search-pronunciation-btn:hover {
    background-color: rgba(109, 142, 255, 0.2);
}

.search-favorite-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #ccc;
    transition: all 0.2s ease;
}

.search-favorite-btn:hover {
    transform: scale(1.2);
    color: #ffaa00;
}

.search-favorite-btn.favorited {
    color: #ffaa00;
}

.search-word-phonetic {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.audio-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #4361ee;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.audio-btn:hover {
    transform: scale(1.2);
}

.search-word-meaning {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 10px;
    border-left: 4px solid #4361ee;
}

.search-word-meaning strong {
    display: inline-block;
    font-size: 16px;
    color: #4361ee;
    margin-bottom: 8px;
    background-color: rgba(67, 97, 238, 0.1);
    padding: 3px 10px;
    border-radius: 15px;
}

.search-word-definition {
    margin: 8px 0;
    line-height: 1.5;
    color: #333;
}

.search-word-example {
    margin: 5px 0 10px 20px;
    color: #666;
    font-style: italic;
    line-height: 1.4;
    padding-left: 10px;
    border-left: 2px solid #ddd;
}

.search-word-synonyms {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.search-word-synonym {
    background-color: rgba(67, 97, 238, 0.08);
    color: #4361ee;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-word-synonym:hover {
    background-color: rgba(67, 97, 238, 0.15);
}

.search-error {
    padding: 20px;
    color: #e53e3e;
    text-align: center;
    font-size: 16px;
}

/* Animation for search results */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-results:not(.hidden) {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Typing Test Overlay */
.typing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 1rem;
    animation: overlay-appear 0.3s ease-in forwards;
    z-index: 100;
}

/* Format Chinese examples */
.card .content .example-trans {
    font-size: 1.3em;
    color: #3498db; /* Vibrant blue for better contrast */
    margin: 5px 0 20px 0;
    line-height: 1.5;
    text-align: left;
    padding: 0 10px;
    font-weight: 500; /* Make Chinese a bit bolder */
}

.additional-content {
    width: 100%;
    overflow: hidden; /* Hide overflow, disable scrolling */
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Improve the Chinese translation styling */
.chinese-text {
    color: #3498db;
    font-weight: 500;
    display: inline-block;
    margin-top: 5px;
}

.examples-header {
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 1em;
    font-weight: bold;
}

/* Style for the back side of the card */
#back {
    background: linear-gradient(120deg, var(--back-gradient-1) 30%, var(--back-gradient-2) 88%,
        var(--back-gradient-3) 40%, var(--back-gradient-4) 78%);
    color: white;
    transform: rotateY(180deg);
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    max-height: 600px;
}

/* Style for the translation */
.card .content .translation {
    font-size: 1.8em;
    color: #fff;
    margin: 15px 0;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Improve example readability */
.card .content .example {
    font-size: 1.5em;
    color: #333;
    margin-top: 20px;
    margin-bottom: 5px;
    line-height: 1.6;
    text-align: left;
    padding: 0 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.example-container {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
}

.example-container:last-child {
    border-bottom: none;
    margin-bottom: 10px;
}

.card .content .example {
    font-size: 1.5em;
    color: #333;
    margin-top: 5px;
    margin-bottom: 5px;
    line-height: 1.6;
    text-align: left;
    padding: 0 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card .content .example-trans {
    font-size: 1.3em;
    color: #3498db; /* Vibrant blue for better contrast */
    margin: 0 0 5px 20px;
    line-height: 1.5;
    text-align: left;
    padding: 0 10px;
    font-weight: 500; /* Make Chinese a bit bolder */
}

/* Adjust container to make scrolling conditional */
#back > div {
    max-height: calc(100% - 40px);
    overflow-y: auto;
}

@media screen and (max-width: 768px) {
    .card .content .example {
        font-size: 1.3em;
        padding: 0 5px;
        margin-top: 2px;
    }
    
    .card .content .example-trans {
        font-size: 1.1em;
        padding: 0 5px;
        margin: 0 0 5px 20px; /* Adjusted for smaller screens */
    }
}

/* Apply zero letter-spacing to all Chinese text */
.card .content .translation, 
.card p,
.card h2,
.card h3 {
    letter-spacing: 0;
    word-spacing: 0;
}

/* Ensure Chinese text has no spacing */
[lang="zh"],
.chinese-text {
    letter-spacing: 0;
    word-spacing: 0;
}

/* Scale down content automatically to fit within the card */
.card .content {
    font-size: 1.1em; /* Smaller base font size */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-height: 100%;
    transform: scale(0.95); /* Slightly scale down all content */
}

/* Smaller example text to fit more content */
.card .content .example {
    font-size: 1em;
    margin-top: 5px;
    margin-bottom: 2px;
    line-height: 1.2;
}

.card .content .example-trans {
    font-size: 0.9em;
    margin: 0 0 5px 10px;
    line-height: 1.2;
}

/* Adjust examples header */
.examples-header {
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 1em;
    font-weight: bold;
}

.card .content .word-head {
    font-size: 2.5em; /* Reduced size */
    font-weight: 700;
    margin-bottom: 12px;
    margin-top: 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    letter-spacing: 0; /* Ensure no extra spacing between characters */
}

.card .content .phonetic {
    font-size: 1em;
    color: #555;
    margin-bottom: 3px;
}

.card .content .translation {
    font-size: 1.4em;
    color: #fff;
    margin: 5px 0;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.card .content .eng-definition {
    font-size: 1.2em;
    color: #eee;
    margin-top: 10px;
    line-height: 1.4;
}

.card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* Game styles */
.game-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.game-intro {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f5f8ff;
    border-radius: 8px;
    border-left: 4px solid #4361ee;
}

.game-intro p {
    margin: 8px 0;
    color: #333;
}

.game-intro .highlight {
    font-weight: bold;
    color: #4361ee;
}

.game-option {
    background-color: #f8f8f8;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    width: 200px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #4361ee;
}

.game-option h4 {
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
}

.game-option p {
    color: #666;
    font-size: 0.9em;
    margin: 0;
}

.game-option[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #4361ee;
    color: white;
}

.game-header h3 {
    margin: 0;
    font-size: 1.4em;
}

.game-stats {
    display: flex;
    align-items: center;
    gap: 15px;
}

.word-source {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.85);
    background-color: rgba(0, 0, 0, 0.2);
    padding: 4px 10px;
    border-radius: 15px;
}

.game-btn {
    background-color: white;
    color: #4361ee;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.game-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.game-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.game-item {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    min-height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.game-item.word {
    background-color: #ebf5ff;
    border-color: #4361ee;
}

.game-item.translation {
    background-color: #fff5eb;
    border-color: #ed8936;
}

.game-item-inner {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    text-align: center;
}

.game-item-content {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3; /* Added standard property */
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.game-item.selected {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.5);
}

.game-item.matched {
    opacity: 0.6;
    cursor: default;
    background-color: #f0f0f0;
    border-color: #48bb78;
    box-shadow: 0 0 0 2px rgba(72, 187, 120, 0.5);
}

/* Utility Classes */
.hidden {
    display: none !important; /* Use !important to ensure override if needed */
}

/* Personal Info Container */
.personal-info-container {
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 20px;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: center;
}

.personal-info-container img {
    max-width: 180px; /* Slightly smaller max-width */
    max-height: 180px; /* Added max-height */
    margin: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    vertical-align: middle; /* Align images better if they wrap */
}

.personal-info-container p {
    margin-top: 15px;
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

/* Center Button Container */
.center-button-container {
    text-align: center; /* Center the inline-block/inline elements inside */
    margin-top: 15px;   /* Add some space above the button */
    margin-bottom: 15px;/* Add some space below the button */
}

/* 简历链接样式 */
.resume-link {
    margin-top: 12px;
    margin-bottom: 15px;
    text-align: center;
}

.resume-link a {
    color: #2196f3;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.resume-link a:hover {
    color: #0d47a1;
    text-decoration: underline;
}

/* 个人信息弹窗样式 */
.personal-info-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    overflow-y: auto;
    padding-bottom: 20px;
}

.personal-info-container.hidden {
    display: none;
}

.personal-info-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: -1;
}

.personal-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.personal-info-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.close-info-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0 5px;
    line-height: 1;
}

.close-info-btn:hover {
    color: #e53e3e;
}

.personal-info-content {
    padding: 20px;
}

.personal-images {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 25px;
    padding: 0 10px;
}

.personal-images img {
    width: 32%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    object-fit: contain;
}

.personal-images img:hover {
    transform: scale(1.03);
}

.info-message {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #e91e63;
    margin: 15px 0;
}

.pdf-container {
    width: 100%;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.pdf-label {
    background-color: #4caf50;
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 10px;
    text-align: center;
}

@media (max-width: 768px) {
    .personal-images {
        flex-direction: column;
        align-items: center;
    }
    
    .personal-images img {
        width: 80%;
        margin-bottom: 10px;
    }
    
    .personal-info-content {
        padding: 15px 10px;
    }
}

/* From Uiverse.io by StealthWorm */
.btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 13rem;
  overflow: hidden;
  height: 3rem;
  background-size: 300% 300%;
  cursor: pointer;
  backdrop-filter: blur(1rem);
  border-radius: 5rem;
  transition: 0.5s;
  animation: gradient_301 5s ease infinite;
  border: double 4px transparent;
  background-image: linear-gradient(#212121, #212121),
    linear-gradient(
      137.48deg,
      #ffdb3b 10%,
      #fe53bb 45%,
      #8f51ea 67%,
      #0044ff 87%
    );
  background-origin: border-box;
  background-clip: content-box, border-box;
  margin: 0 auto;
}

#container-stars {
  position: absolute;
  z-index: -1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: 0.5s;
  backdrop-filter: blur(1rem);
  border-radius: 5rem;
}

.btn strong {
  z-index: 2;
  font-size: 14px;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 0 4px white;
  font-weight: bold;
}

#glow {
  position: absolute;
  display: flex;
  width: 12rem;
}

.circle {
  width: 100%;
  height: 30px;
  filter: blur(2rem);
  animation: pulse_3011 4s infinite;
  z-index: -1;
}

.circle:nth-of-type(1) {
  background: rgba(254, 83, 186, 0.636);
}

.circle:nth-of-type(2) {
  background: rgba(142, 81, 234, 0.704);
}

.btn:hover #container-stars {
  z-index: 1;
  background-color: #212121;
}

.btn:hover {
  transform: scale(1.1);
}

.btn:active {
  border: double 4px #fe53bb;
  background-origin: border-box;
  background-clip: content-box, border-box;
  animation: none;
}

.btn:active .circle {
  background: #fe53bb;
}

#stars {
  position: relative;
  background: transparent;
  width: 200rem;
  height: 200rem;
}

#stars::after {
  content: "";
  position: absolute;
  top: -10rem;
  left: -100rem;
  width: 100%;
  height: 100%;
  animation: animStarRotate 90s linear infinite;
}

#stars::after {
  background-image: radial-gradient(#ffffff 1px, transparent 1%);
  background-size: 50px 50px;
}

#stars::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 170%;
  height: 500%;
  animation: animStar 60s linear infinite;
}

#stars::before {
  background-image: radial-gradient(#ffffff 1px, transparent 1%);
  background-size: 50px 50px;
  opacity: 0.5;
}

@keyframes animStar {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-135rem);
  }
}

@keyframes animStarRotate {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0);
  }
}

@keyframes gradient_301 {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes pulse_3011 {
  0% {
    transform: scale(0.75);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
  }

  100% {
    transform: scale(0.75);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}
