/* KEYFRAMES */

@keyframes spin {
  from {
    transform: rotate(0);
  }
  to{
    transform: rotate(359deg);
  }
}

@keyframes configure-clockwise {
  0% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(90deg);
  }
  50% {
    transform: rotate(180deg);
  }
  75% {
    transform: rotate(270deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes configure-xclockwise {
  0% {
    transform: rotate(45deg);
  }
  25% {
    transform: rotate(-45deg);
  }
  50% {
    transform: rotate(-135deg);
  }
  75% {
    transform: rotate(-225deg);
  }
  100% {
    transform: rotate(-315deg);
  }
}

@keyframes pulse {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: .25;
    transform: scale(.75);
  }
}

/* GRID STYLING */

* {
  box-sizing: border-box;
}

.spinner-box {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
}

/* SPINNING CIRCLE */

.circle-border {
  width: 150px;
  height: 150px;
  padding: 3px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: rgb(63,249,220);
  background: linear-gradient(0deg, rgba(63,249,220,0.1) 33%, rgba(63,249,220,1) 100%);
  animation: spin .8s linear 0s infinite;
}

.circle-core {
  width: 100%;
  height: 100%;
  /*background-color: #37474f;*/
  background-color: #f4f5f7;
  border-radius: 50%;
}

/* X-ROTATING BOXES */

.configure-border-1 {
  width: 115px;
  height: 115px;
  padding: 3px;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffab91;
  animation: configure-clockwise 3s ease-in-out 0s infinite alternate;
}

.configure-border-2 {
  width: 115px;
  height: 115px;
  padding: 3px;
  left: -115px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgb(63,249,220);
  transform: rotate(45deg);
  animation: configure-xclockwise 3s ease-in-out 0s infinite alternate;
}

.configure-core {
  width: 100%;
  height: 100%;
  background-color: #37474f;
}

/* PULSE BUBBLES */

.pulse-container {
  width: 120px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pulse-bubble {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #3ff9dc;
}

.pulse-bubble-1 {
    animation: pulse .4s ease 0s infinite alternate;
}
.pulse-bubble-2 {
    animation: pulse .4s ease .2s infinite alternate;
}
.pulse-bubble-3 {
    animation: pulse .4s ease .4s infinite alternate;
}

/* SOLAR SYSTEM */

.solar-system {
  width: 250px;
  height: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.orbit {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	border: 1px solid #ffffffa5;
	border-radius: 50%;
}

.earth-orbit {
	width: 165px;
	height: 165px;
  -webkit-animation: spin 12s linear 0s infinite;
}

.venus-orbit {
	width: 120px;
	height: 120px;
  -webkit-animation: spin 7.4s linear 0s infinite;
}

.mercury-orbit {
	width: 90px;
	height: 90px;
  -webkit-animation: spin 3s linear 0s infinite;
}

.planet {
	position: absolute;
	top: -5px;
  width: 10px;
  height: 10px;
	border-radius: 50%;
  background-color: #3ff9dc;
}

.sun {
	width: 35px;
	height: 35px;
	border-radius: 50%;
	background-color: #ffab91;
}

/* =========================================================================
 * Rorical 增强样式：黑白哀悼 / 文章缩略图 / 摄影相册 / 分类目录 / 关于我 / 页脚
 * ====================================================================== */

/* --- 黑白哀悼 ---------------------------------------------------------
 * 逐子元素应用滤镜：若直接对 html/body 使用 filter 会产生新的包含块，
 * 导致 position: fixed 的返回顶部按钮与灯箱错位。
 */
html.grayscale-mode body > * {
    filter: grayscale(1) contrast(1.02);
    -webkit-filter: grayscale(1) contrast(1.02);
}

.rorical-memorial {
    position: relative;
    z-index: 110;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 9px 20px;
    font-size: .84rem;
    line-height: 1.6;
    color: #ededed;
    text-align: center;
    background: #17181b;
    letter-spacing: .01em;
}

.rorical-memorial__date {
    opacity: .7;
    font-size: .78rem;
}

/* --- 文章缩略图：用 aspect-ratio 预留占位高度，避免图片加载后页面跳动 --- */
img.rorical-card-img {
    display: block;
    width: 100%;
    aspect-ratio: var(--rorical-thumb-ratio, 16 / 9);
    object-fit: cover;
}

.rorical-layout-list .row-grid {
    max-width: 960px;
}

.rorical-layout-list img.rorical-card-img {
    aspect-ratio: 21 / 9;
}

/* --- 页脚备案图标与运行时间 --- */
.footer-beian-icon {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: -2px;
}

.footer-running {
    color: #8898aa;
}

/* --- 摄影相册 --- */
.rorical-photo-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 18px 0;
}

.rorical-photo-filter .btn {
    border-radius: 999px;
}

.rorical-photo-filter em {
    font-style: normal;
    opacity: .7;
    margin-left: 4px;
}

.rorical-masonry {
    column-count: 3;
    column-gap: 14px;
    margin-top: 18px;
}

.rorical-masonry__item {
    position: relative;
    break-inside: avoid;
    margin-bottom: 14px;
    border-radius: .375rem;
    overflow: hidden;
    cursor: zoom-in;
}

.rorical-masonry__item img {
    display: block;
    width: 100%;
}

.rorical-masonry__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 6px 10px;
    font-size: .78rem;
    color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, .65));
}

@media (max-width: 991px) {
    .rorical-masonry { column-count: 2; }
}

@media (max-width: 575px) {
    .rorical-masonry { column-count: 1; }
}

/* --- 分类目录卡片 --- */
.rorical-cat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 16px 18px;
    border-radius: .375rem;
    background: #fff;
    box-shadow: 0 0 1.25rem rgba(0, 0, 0, .08);
    color: #32325d;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.rorical-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 1.5rem rgba(0, 0, 0, .14);
    color: #32325d;
    text-decoration: none;
}

.rorical-cat-card__icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #5e72e4;
    color: #fff;
    font-size: 1.1rem;
}

.rorical-cat-card__body {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.rorical-cat-card__name {
    display: block;
    font-weight: 600;
}

.rorical-cat-card__desc {
    display: block;
    overflow: hidden;
    font-size: .8rem;
    color: #8898aa;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rorical-cat-card__count {
    flex: 0 0 auto;
    font-size: .8rem;
    color: #8898aa;
}

/* --- 关于我 --- */
.rorical-about-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.rorical-about-hero__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
}

.rorical-about-hero__name {
    margin: 0 0 6px;
}

.rorical-about-hero__bio {
    margin: 0;
    color: #8898aa;
}

.rorical-skills {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rorical-skills li {
    margin-bottom: 14px;
}

.rorical-skills .rorical-skill__head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: .85rem;
}

.rorical-skills .rorical-skill__bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(94, 114, 228, .15);
    overflow: hidden;
}

.rorical-skills .rorical-skill__bar > span {
    display: block;
    width: var(--skill-value, 0%);
    height: 100%;
    border-radius: 999px;
    background: #5e72e4;
}

/* --- 顶部导航搜索框 --- */
.rorical-search {
    position: relative;
    display: flex;
    align-items: center;
}

.rorical-search .ni {
    position: absolute;
    left: 12px;
    color: rgba(255, 255, 255, .75);
    font-size: .95rem;
    pointer-events: none;
}

.rorical-search input {
    width: 170px;
    padding: 7px 14px 7px 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: .875rem;
    outline: none;
    transition: width .2s ease, background .2s ease;
}

.rorical-search input::placeholder {
    color: rgba(255, 255, 255, .7);
}

.rorical-search input:focus {
    width: 210px;
    background: rgba(255, 255, 255, .28);
}

@media (max-width: 991px) {
    .rorical-search-item { width: 100%; margin: 8px 0; }
    .rorical-search { width: 100%; }
    .rorical-search input,
    .rorical-search input:focus {
        width: 100%;
        /* 手机端字号不低于 16px，避免部分浏览器聚焦时自动放大页面 */
        font-size: 16px;
    }
}

/* --- 友情链接卡片 --- */
.rorical-friend {
    display: block;
    height: 100%;
    padding: 20px 14px;
    border-radius: .375rem;
    background: #fff;
    box-shadow: 0 0 1.25rem rgba(0, 0, 0, .08);
    color: #32325d;
    text-align: center;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.rorical-friend:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 1.5rem rgba(0, 0, 0, .14);
    color: #32325d;
    text-decoration: none;
}

.rorical-friend__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    overflow: hidden;
    border-radius: 50%;
    background: #5e72e4;
    color: #fff;
}

.rorical-friend__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rorical-friend__avatar em {
    font-style: normal;
    font-size: 1.25rem;
    font-weight: 600;
}

.rorical-friend__name {
    display: block;
    font-weight: 600;
}

.rorical-friend__desc {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    font-size: .8rem;
    color: #8898aa;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* --- 关于我：卡片网格 --- */
.rorical-about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 18px;
    margin-top: 24px;
    text-align: left;
}

.card-body > .rorical-panel {
    margin-top: 24px;
    text-align: left;
}

.rorical-panel {
    padding: 20px 22px;
    border-radius: .375rem;
    background: #fff;
    box-shadow: 0 0 1.25rem rgba(0, 0, 0, .08);
}

.rorical-panel__title {
    margin: 0 0 10px;
    padding-left: 12px;
    border-left: 3px solid #5e72e4;
    font-size: 1.05rem;
}

.rorical-panel .content > :last-child {
    margin-bottom: 0;
}

/* --- 搜索结果页 --- */
.rorical-search-card .display-4 {
    font-size: 1.5rem;
    line-height: 1.4;
}

.rorical-search-card .card-body {
    text-align: left;
}

.rorical-search-card .text-black {
    text-align: left;
    word-break: break-word;
}

/* --- 内页顶部封面色块（关于我 / 摄影相册 / 分类目录 / 友情链接） --- */
.rorical-page-cover {
    margin: 85px 0;
}

/* 手机端：不整块隐藏，而是压缩成一条横幅，
 * 顶部随机图继续充当背景，滚动时不会出现大片空白。 */
@media (max-width: 768px) {
    .rorical-cover-compact-mobile {
        height: 220px;
        margin: 56px 0 22px;
    }
}

/* =========================================================================
 * 移动端适配补充
 * ====================================================================== */
@media (max-width: 768px) {
    /* 手机端不使用 background-attachment: fixed（iOS 支持差、滚动重绘卡顿） */
    .rorical-page-cover .shape-background {
        background-attachment: scroll;
    }

    /* 正文里的长链接 / 代码块 / 表格不撑破卡片 */
    .content {
        overflow-wrap: break-word;
        overflow-wrap: anywhere;
    }

    .content img,
    .content video,
    .content iframe,
    .content table {
        max-width: 100%;
        height: auto;
    }

    .content pre {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .rorical-panel {
        padding: 16px;
    }
}

@media (max-width: 575px) {
    .rorical-about-hero {
        gap: 12px;
    }

    .rorical-about-hero__avatar {
        width: 72px;
        height: 72px;
    }

    .rorical-about-hero__name {
        font-size: 1.25rem;
    }

    .rorical-about-hero__bio {
        font-size: .875rem;
    }

    .rorical-search-card .display-4 {
        font-size: 1.15rem;
    }

    .rorical-photo-filter .btn {
        padding: .35rem .7rem;
        font-size: .78rem;
    }
}