/**
 * 作者: songxinfeng
 * 创建时间: 2024-12-28
 * 最后修改时间: 2024-12-28
 * 描述: 样式文件 - 支持响应式设计和导入导出功能
 */

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}
#time-line {
    stroke: #007acc;
    stroke-width: 2px;
}


.circle-text {
    font-size: 12px;
    fill: #fff;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}
.date-change-text {
    font-size: 16px;
    cursor: pointer;
}
.circle-text{
    cursor: pointer;
}

/* #current-date-text {
    fill: red;
    font-weight: bold;
}
#current-date-circle {
    fill: white;
    stroke: black;
    stroke-width: 1;
}
#current-date-circle-text {
    color: red;
    font-size: 12px;
} */

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5vh auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

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

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-body {
    padding: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

.form-group textarea:focus {
    outline: none;
    border-color: #007acc;
    box-shadow: 0 0 5px rgba(0, 122, 204, 0.3);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="email"]:focus {
    outline: none;
    border-color: #007acc;
    box-shadow: 0 0 5px rgba(0, 122, 204, 0.3);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #007acc;
    color: white;
}

.btn-primary:hover {
    background-color: #005a9e;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.form-text {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* 模块矩形框的交互样式 */
.date-rect {
    cursor: pointer;
    transition: fill 0.2s;
}

.date-rect:hover {
    fill: #e3f2fd !important;
}

.date-rect-text {
    cursor: pointer;
    font-size: 14px;
    fill: #000;
    pointer-events: none;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

/* 日记内容文本样式 */
.diary-content-text {
    font-size: 10px;
    fill: #666;
    pointer-events: none;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

/* 自定义提示框样式 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #4CAF50;
    color: white;
    padding: 0;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: all 0.3s ease-in-out;
    max-width: 300px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.toast-close {
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    margin-left: 10px;
    opacity: 0.8;
}

.toast-close:hover {
    opacity: 1;
}

/* 错误提示样式 */
.toast.error {
    background: #f44336;
}

/* 警告提示样式 */
.toast.warning {
    background: #ff9800;
}

/* 信息提示样式 */
.toast.info {
    background: #2196F3;
}

/* 顶部按钮样式 */
.top-left-btns {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.top-right-btns {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 8px 16px;
    background-color: #007acc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    height: 36px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background-color: #005a9e;
}

.action-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 下拉菜单样式 */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    display: none;
    position: absolute;
    background: #fff;
    min-width: 110px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1000;
    border-radius: 4px;
    padding: 4px 0;
    left: 0; /* 左对齐父菜单 */
    right: auto;
}
.dropdown.open .dropdown-menu {
    display: block;
}
.dropdown-menu button {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    height: 36px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}
.dropdown-menu button:hover {
    background: #f0f0f0;
}
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; }

/* 设置菜单右对齐 */
#settings-menu {
    left: auto;
    right: 0;
}

/* 响应式设计 - 移动设备 */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 2vh auto;
        max-height: 96vh;
    }
    
    .modal-header {
        padding: 15px 15px 10px 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .form-group textarea {
        min-height: 100px;
    }
    
    .top-left-btns {
        top: 10px;
        left: 10px;
        gap: 5px;
    }
    
    .top-right-btns {
        top: 10px;
        right: 10px;
        gap: 5px;
    }
    
    .action-btn {
        padding: 6px 12px;
        font-size: 12px;
        height: 32px;
    }
    
    .user-greeting {
        padding: 6px 12px;
        font-size: 12px;
        height: 32px;
    }
    
    .dropdown-menu button {
        padding: 6px 12px;
        font-size: 12px;
        height: 32px;
    }
}

/* 底部公告样式 */
.bottom-announcement {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    z-index: 1000;
    max-width: 450px;
    min-width: 320px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: announcementPulse 2s ease-in-out infinite;
}

@keyframes announcementPulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
        transform: translateX(-50%) scale(1);
    }
    50% {
        box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
        transform: translateX(-50%) scale(1.02);
    }
}

.announcement-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    gap: 15px;
}

.announcement-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.announcement-close {
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    opacity: 0.8;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.announcement-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 - 小屏幕设备 */
@media screen and (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 1vh auto;
        max-height: 98vh;
    }
    
    .modal-header {
        padding: 10px 10px 8px 10px;
    }
    
    .modal-body {
        padding: 10px;
    }
    
    .form-group textarea {
        min-height: 80px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
    font-size: 16px; /* 防止iOS缩放 */
}

    .bottom-announcement {
        bottom: 10px;
        max-width: calc(100% - 20px);
        min-width: auto;
        animation: announcementPulse 2s ease-in-out infinite;
    }
    
    .announcement-content {
        padding: 12px 16px;
    }
    
    .announcement-text {
        font-size: 14px;
    }
}

/* 加载动画样式 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007acc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

#analyze-btn{
    background-color: #dc3545;
    
}

#analyze-btn:hover {
    background-color: #c82333;
}

/* 用户问候信息样式 */
.user-greeting {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    margin-right: 15px;
    padding: 8px 16px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    white-space: nowrap;
    height: 36px;
    box-sizing: border-box;
}

#username-display {
    color: #007acc;
    font-weight: 600;
    margin-left: 5px;
}

/* 联系我们模态框样式 */
.contact-info {
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.contact-item label {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
    min-width: 60px;
}

.contact-value {
    flex: 1;
    color: #007acc;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin-right: 10px;
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-small:hover {
    background-color: #5a6268;
}

@media screen and (max-width: 480px) {
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contact-item label {
        margin-bottom: 5px;
        margin-right: 0;
    }
    
    .contact-value {
        margin-bottom: 8px;
        margin-right: 0;
    }
}