/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== 页面整体 ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    margin: 0;
    color: #333;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a0a1e 0%, #2d1f3d 50%, #1a0a1e 100%);
}

/* ===== 内容容器 ===== */
.content {
    position: relative;
    z-index: 10;
    /* 确保内容在 Canvas 上方 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
    width: 100%;
    padding: clamp(12px, 4vw, 20px);

    /* pointer-events: none; 如果想让鼠标穿透到页面元素，取消这行注释 */
    animation: fadeIn 1s ease-out;
}

/* ===== 标题样式 ===== */
.title {
    font-size: clamp(30px, 9vw, 64px);
    color: #ee607e;
    text-align: center;
    text-shadow:
        0 0 30px rgba(255, 192, 203, 0.8),
        0 0 60px rgba(255, 105, 180, 0.5);
    margin-bottom: clamp(12px, 3vw, 20px);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ===== 副标题 ===== */
.subtitle {
    font-size: clamp(14px, 4vw, 24px);
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: clamp(20px, 6vw, 40px);
    text-align: center;
}

/* ===== 内容卡片 ===== */
.card {
    width: min(92vw, 500px);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: clamp(10px, 3vw, 18px);
    border: 1px solid rgba(255, 192, 203, 0.3);
    text-align: center;
    box-shadow: 0 8px 32px rgba(255, 105, 180, 0.2);
    overflow: hidden;
}

.card h2 {
    color: #ffb6c1;
    font-size: clamp(22px, 6vw, 32px);
    margin-bottom: 20px;
}

/* ===== 控制按钮 ===== */
.controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 10px;
}

.controls button {
    background: rgba(255, 105, 180, 0.3);
    border: 1px solid rgba(255, 192, 203, 0.5);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.controls button:hover {
    background: rgba(255, 105, 180, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.4);
}

/* ===== 页脚信息 ===== */
.info {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* ===== 淡入动画 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 数字呼吸效果 ===== */
@keyframes breathing {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* ===== 数字样式 ===== */
.number {
    font-size: 1.1em;
    color: #e74c3c;
    display: inline-block;
    animation: breathing 2s ease-in-out infinite;
}

/* ===== 通用 h1，保留原样式并适配 ===== */
h1 {
    font-size: clamp(28px, 7vw, 38px);
    color: #e67e22;
    margin: 0.5em 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e67e22, transparent);
}

/* ===== 段落 ===== */
p {
    font-size: clamp(14px, 3.8vw, 19px);
    color: #555;
    margin: 0.8em 0;
    line-height: 1.45;
    transition: transform 0.3s ease;
}

p:hover {
    transform: translateY(-2px);
}

/* ===== 高亮文本块 ===== */
.highlight {
    display: inline-flex;         /* ✅ 关键：改成 flex */
    align-items: center;          /* ✅ 垂直居中内容 */
    
    height: 42px;                 /* ✅ 固定高度（可调） */
    padding: 0 12px;              /* ✅ 左右留白（不要上下 padding） */

    color: #e74c3c;
    font-weight: bold;

    border-radius: 8px;
    background: rgba(231, 76, 60, 0.1);

    margin: 0.3em 0;
    max-width: 100%;
}

/* ===== 单行文本：保留，但移动端做保护 ===== */
.nowrap-text {
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 备注文字 ===== */
.note {
    font-style: italic;
    color: #666;
    font-size: clamp(13px, 3.2vw, 16px);
    padding: 1em;
    border-top: 1px dashed #ddd;
    margin-top: 1.5em;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    line-height: 1.6;
}





#relationshipSummary {
    font-size: clamp(12px, 3.5vw, 18px);
    line-height: 1.5;
}

#relationshipSummary span {
    display: inline-block;
    min-width: 5em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: #e74c3c;
    font-weight: bold;
	 animation: breathing 2s ease-in-out infinite;
}


/* ===== 中等屏幕适配 ===== */
@media (max-width: 768px) {
    .container {
        margin: 1rem;
        padding: 1.5rem;
    }

    h1 {
        font-size: clamp(24px, 7vw, 32px);
    }

    p {
        font-size: clamp(12px, 4vw, 18px);
        line-height: 1.4;
    }

    .number {
        font-size: 1.08em;
    }

    .controls {
        right: 12px;
        bottom: 12px;
    }

    .controls button {
        padding: 8px 14px;
        font-size: 12px;
    }

    .info {
        left: 12px;
        bottom: 12px;
        font-size: 11px;
    }
}

/* ===== 小屏手机适配 ===== */
@media (max-width: 480px) {
    body {
        align-items: center;
    }

    .content {
        padding: 12px;
    }

    .title {
        font-size: clamp(28px, 10vw, 42px);
        margin-bottom: 14px;
    }

    .subtitle {
        margin-bottom: 20px;
    }

    .card {
        width: 94vw;
        padding: 10px;
        border-radius: 16px;
    }

    p {
        font-size: clamp(12px, 3.8vw, 16px);
        margin: 0.55em 0;
        line-height: 1.35;
    }

    .highlight {
        padding: 0.45em 0.65em;
        margin: 0.25em 0;
    }

    .number {
        font-size: 1.02em;
    }

    .note {
        font-size: clamp(12px, 3.4vw, 15px);
        padding: 0.8em;
        margin-top: 1em;
    }

    .nowrap-text {
        font-size: clamp(11px, 3.2vw, 14px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
	
	#relationshipSummary span {
        min-width: 3em;
    }

}

/* ===== 超小屏手机适配，例如 iPhone SE ===== */
@media (max-width: 360px) {
    .title {
        font-size: 26px;
    }

    p {
        font-size: 12px;
    }

    .card {
        width: 96vw;
        padding: 8px;
    }

    .highlight {
        padding: 0.4em 0.5em;
    }

    .number {
        font-size: 1em;
    }
}