/* 基础布局样式 */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 页面标题样式 */
.page-title {
    text-align: center;
    color: #89CFF0;
    font-family: "Microsoft YaHei", sans-serif;
    font-size: 48px;
    margin: 0px auto 20px auto;
    text-shadow: 2px 2px 4px rgba(137, 207, 240, 0.2);
    letter-spacing: 2px;
}

/* 图表容器样式 */
#graph-container {
    width: 1280px;
    height: 680px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0px auto 20px auto;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 马卡龙色彩定义 */
:root {
    --macaron-blue: #89CFF0;
    --macaron-green: #98D8C8;
    --macaron-orange: #FFB347;
    --macaron-pink: #FF9999;
    --macaron-purple: #B19CD9;
}

/* 遮罩层和对话框基础样式 */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* 弹窗基础样式 */
.confirm-dialog {
    background: white;
    padding: 32px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 360px;
    animation: dialogPop 0.3s ease;
    font-family: "Microsoft YaHei", sans-serif;
}

.confirm-dialog p {
    color: #333;
    font-size: 16px;
    margin: 0 0 32px 0;
    line-height: 1.5;
}

.confirm-dialog .button-container {
    margin-top: 32px;
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

.confirm-dialog button {
    padding: 10px 32px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    font-family: "Microsoft YaHei", sans-serif;
    min-width: 100px;
}

/* 不同类型弹窗的按钮样式 */
.confirm-dialog .confirm-btn {
    background: var(--macaron-blue);
    color: white;
    box-shadow: 0 2px 6px rgba(137, 207, 240, 0.4);
}

.confirm-dialog.delete-dialog .confirm-btn {
    background: var(--macaron-pink);
    box-shadow: 0 2px 6px rgba(255, 153, 153, 0.4);
}

.confirm-dialog.clear-dialog .confirm-btn {
    background: var(--macaron-purple);
    box-shadow: 0 2px 6px rgba(177, 156, 217, 0.4);
}

.confirm-dialog .cancel-btn {
    background: white;
    border: 2px solid #e0e0e0;
    color: #666;
}

/* 按钮悬停效果 */
.confirm-dialog .confirm-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.confirm-dialog.delete-dialog .confirm-btn:hover {
    box-shadow: 0 4px 8px rgba(255, 153, 153, 0.5);
}

.confirm-dialog.clear-dialog .confirm-btn:hover {
    box-shadow: 0 4px 8px rgba(177, 156, 217, 0.5);
}
.confirm-dialog.save-dialog .confirm-btn:hover {
    box-shadow: 0 4px 8px rgba(137, 207, 240, 0.5);
}

.confirm-dialog .cancel-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.confirm-dialog .cancel-btn:hover {
    background: #f5f5f5;
}

/* 按钮基础样式 */
.btn {
    padding: 8px 20px;
    font-size: 16px;
    border-radius: 20px;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Microsoft YaHei", sans-serif;
    margin: 0 15px;
}

/* 按钮变体 */
.add-person-btn { border: 2px solid var(--macaron-green); }
.add-relation-btn { border: 2px solid var(--macaron-pink); }
.save-btn { border: 2px solid var(--macaron-blue); }
.help-btn { border: 2px solid var(--macaron-orange); }
.clear-all-btn { border: 2px solid var(--macaron-purple); }

/* 按钮悬停效果 */
.add-person-btn:hover { background: var(--macaron-green); color: white; }
.add-relation-btn:hover { background: var(--macaron-pink); color: white; }
.save-btn:hover { background: var(--macaron-blue); color: white; }
.help-btn:hover { background: var(--macaron-orange); color: white; }
.clear-all-btn:hover { background: var(--macaron-purple); color: white; }

/* 底部按钮容器 */
.bottom-buttons {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    padding: 15px 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    gap: 30px;
}

/* 顶部渐变条 */
.macaron-bar {
    width: 100vw;
    height: 18px;
    min-height: 18px;
    background: linear-gradient(90deg, 
        var(--macaron-blue) 0%, 
        var(--macaron-green) 25%, 
        var(--macaron-orange) 50%, 
        var(--macaron-pink) 75%, 
        var(--macaron-purple) 100%);
    background-size: 200% 100%;
    box-shadow: 0 2px 8px rgba(137, 207, 240, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    animation: gradientFlow 6s linear infinite;
}

/* 动画 */
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes dialogPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 节点选中状态 */
.selected-node {
    stroke-width: 3px !important;
}
.cropper-view-box,
.cropper-face {
    border-radius: 50%;
}

.cropper-view-box {
    outline: 0;
    box-shadow: 0 0 0 1px #39f;
}

/* 关系选择状态样式 */
.selecting-source {
    stroke: #FFA07A !important;  /* 浅橙色 */
    stroke-width: 3px !important;
    cursor: pointer !important;
}

.selecting-target {
    stroke: #FFB6C1 !important;  /* 浅粉色 */
    stroke-width: 3px !important;
    cursor: pointer !important;
}

.selected-source {
    stroke: #FF7F50 !important;  /* 深橙色 */
    stroke-width: 4px !important;
}

.selected-target {
    stroke: #FF69B4 !important;  /* 深粉色 */
    stroke-width: 4px !important;
}