@font-face {
    font-family: 'Quicksand';
    src: url('/my_note_daily/static/fonts/Quicksand-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

body {
    font-family: 'Quicksand';
    transition: background-color 0.3s, color 0.3s;
    padding: 0;
    margin: 0;
}

/* 主题样式 */
/* 清新蓝主题 */
body.fresh-blue {
    background-color: #e3f2fd;
    color: #01579b;
}

body.fresh-blue .card {
    background-color: #ffffff;
    color: #01579b;
    border: 1px solid #0288d1;
}

body.fresh-blue #theme-toggle {
    background-color: #0288d1;
    color: white;
}

/* 深色模式 */
body.dark-mode {
    background-color: #212121;
    color: #f8f9fa;
}

body.dark-mode .card {
    background-color: #333333;
    color: #f8f9fa;
    border: 1px solid #455a64;
}

body.dark-mode #theme-toggle {
    background-color: #455a64;
    color: white;
}

/* 优雅粉主题 */
body.elegant-pink {
    background-color: #fce4ec;
    color: #880e4f;
}

body.elegant-pink .card {
    background-color: #ffffff;
    color: #880e4f;
    border: 1px solid #d81b60;
}

body.elegant-pink #theme-toggle {
    background-color: #d81b60;
    color: white;
}

/* 自然绿主题 */
body.natural-green {
    background-color: #e8f5e9;
    color: #388e3c;
}

body.natural-green .card {
    background-color: #ffffff;
    color: #388e3c;
    border: 1px solid #66bb6a;
}

body.natural-green #theme-toggle {
    background-color: #66bb6a;
    color: white;
}

/* 金色豪华主题 */
body.golden-luxury {
    background-color: #fff8e1;
    color: #f57f17;
}

body.golden-luxury .card {
    background-color: #ffffff;
    color: #f57f17;
    border: 1px solid #ffb300;
}

body.golden-luxury #theme-toggle {
    background-color: #ffb300;
    color: white;
}

/* 简约灰主题 */
body.minimal-gray {
    background-color: #f5f5f5;
    color: #212121;
}

body.minimal-gray .card {
    background-color: #ffffff;
    color: #212121;
    border: 1px solid #9e9e9e;
}

body.minimal-gray #theme-toggle {
    background-color: #9e9e9e;
    color: white;
}

/* 卡片样式 */
.card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, background-color 0.3s, color 0.3s, border-color 0.3s;
    padding: 20px;
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* 使用 flexbox 来使按钮水平排列 */
.text-end {
    display: flex;
    justify-content: space-between; /* 在大屏幕上让按钮一左一右 */
    align-items: center; /* 垂直居中对齐 */
    width: 100%; /* 确保容器占满全宽 */
}

/* 主题切换按钮 */
#theme-toggle {
    background-color: #007bff;
    color: white;
    border-radius: 30px;
    padding: 10px 20px;
    transition: background-color 0.3s;
}

/* 历史摘抄按钮定位 */
#history-toggle {
    background-color: #007bff;
    color: white;
    border-radius: 30px;
    padding: 10px 20px;
    transition: background-color 0.3s;
}

/* 鼠标悬停时的效果 */
#theme-toggle:hover,
#history-toggle:hover {
    background-color: #0056b3;
}

/* 标题和文本 */
h1.display-4 {
    font-size: 3rem;
    font-weight: 600;
    text-align: center;
}


.card-icon-top-left,
.card-icon-top-right,
.card-icon-bottom-left,
.card-icon-bottom-right {
    width: 40px;
    height: 40px;
    fill: #007bff; /* This is just an example, change as needed */
}

.card-icon-top-left {
    left: 10px;
    top: 10px;
}

.card-icon-top-right {
    right: 10px;
    top: 10px;
}

.card-icon-bottom-left {
    left: 10px;
    bottom: 10px;
}

.card-icon-bottom-right {
    right: 10px;
    bottom: 10px;
}

h5 {
    font-size: 1.5rem;
    font-weight: 500;
}

/* 页脚 */
footer {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
    margin-top: 40px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }


    .card {
        margin: 0 auto; /* 居中卡片 */
        width: 90%;
    }

    #history-toggle {
        margin-left: 100px; /* 自定义间距 */
    }
}

/* 响应式：字体适应 */
@media (max-width: 576px) {
    h1.display-4 {
        font-size: 2rem;
    }

}

/* 响应式设计：适配手机 */
@media (max-width: 768px) {
    .text-end {
        /* 保持水平排列，不做垂直排列 */
        justify-content: space-between; /* 仍然是左右两端 */
        align-items: center; /* 垂直居中对齐 */
    }

    #history-toggle {
        margin-top: 0; /* 移除顶部间距 */
    }
}

/* 响应式：字体适应 */
@media (max-width: 576px) {
    h1.display-4 {
        font-size: 2rem;
    }

}

/* 本地SVG图标样式 */
.icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    vertical-align: middle;
    margin-right: 8px;
}


#flash-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    max-width: 90%;
    z-index: 1055;
    animation: fadeDown 0.5s ease-out, fadeUp 0.5s ease-in 3.5s forwards;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translate(-50%, -40px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes fadeUp {
    to {
        opacity: 0;
        transform: translate(-50%, -40px);
    }
}


.note-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0.5em auto;
}

body, p, span, div {
    font-weight: 500 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.modal {
    z-index: 1050 !important;
}

.note-content {
    overflow-x: visible !important;
    word-break: break-word;
}

#note-card {
    overflow: visible !important;
    max-width: none;
    width: fit-content;
    margin: 0 auto;
    position: relative;
}

.btn-small {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    min-width: 80px;
}

/* 按钮容器，水平居中且紧凑 */
.btn-group-custom {
    display: inline-flex;
    gap: 0.5rem;
}

/* 顶部分享提示的 toast 样式 */
#share-toast {
    position: fixed;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #007aff;
    color: white;
    padding: 10px 20px;
    border-radius: 15px;
    font-size: 14px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: top 0.3s ease, opacity 0.3s ease;
    z-index: 2000;
    user-select: none;
}

#share-toast.show {
    top: 20px;
    opacity: 1;
}
