/**
 * RolePilot 网站 - 布局样式
 * 赛博朋克风格页面结构
 */

/* ========== 视觉层 - 透视网格 ========== */
.rp-perspective-grid {
  position: fixed;
  width: 200vw;
  height: 200vh;
  background-image: 
    linear-gradient(var(--rp-grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--rp-grid-color) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
  animation: gridMove 5s linear infinite;
  z-index: 0;
  opacity: 0.6;
  mask-image: radial-gradient(circle at center, black 0%, transparent 70%);
  pointer-events: none;
}

@keyframes gridMove {
  from { transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px); }
  to { transform: perspective(500px) rotateX(60deg) translateY(60px) translateZ(-200px); }
}

/* ========== 噪点覆盖 ========== */
.rp-noise-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.05;
  background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* ========== 扫描线效果 ========== */
.rp-scanline {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  /* 极淡的静态条纹背景 */
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.08) 51%);
  background-size: 100% 8px;
  z-index: 999;
  pointer-events: none;
}

/* 动态扫描光带 */
.rp-scanline::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(0, 243, 255, 0.03) 50%, 
    transparent 100%
  );
  background-size: 100% 200px;
  animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
  0% { background-position: 0 -200px; }
  100% { background-position: 0 100vh; }
}

/* ========== HUD 装饰元素 ========== */
.rp-hud-element {
  position: fixed;
  pointer-events: none;
  z-index: 5;
  color: rgba(0, 243, 255, 0.6);
  font-size: var(--rp-text-xs);
}

.rp-hud-tl { top: 40px; left: 40px; text-align: left; }
.rp-hud-tl div { margin-bottom: 5px; }
.rp-hud-status { color: var(--rp-primary); }

.rp-hud-br { bottom: 40px; right: 40px; text-align: right; }
.rp-blink { animation: blink 1s infinite; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ========== 准星 ========== */
.rp-crosshair {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  pointer-events: none;
  z-index: 5;
}

.rp-ch-1 { top: 20%; left: 20%; border-right: none; border-bottom: none; }
.rp-ch-2 { bottom: 20%; right: 20%; border-left: none; border-top: none; }

/* ========== 3D 悬浮卡片 ========== */
.rp-deck-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  perspective: 1000px;
}

.rp-floating-card {
  position: absolute;
  width: 260px;
  height: 340px;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid var(--rp-border);
  box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
  backdrop-filter: blur(5px);
  opacity: 0.6;
}

.rp-floating-card::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 4px;
  background: var(--rp-primary);
  box-shadow: 0 0 10px var(--rp-primary);
}

.rp-card-line {
  margin-top: 10px;
  margin-left: 10px;
  height: 2px;
  background: #333;
}

.rp-card-line:first-child {
  margin-top: 30px;
}

.rp-card-1 {
  top: 20%;
  left: 15%;
  transform: rotateY(25deg) rotateZ(-10deg);
  animation: float1 8s ease-in-out infinite;
}

.rp-card-2 {
  bottom: 20%;
  right: 15%;
  transform: rotateY(-25deg) rotateZ(10deg);
  animation: float2 9s ease-in-out infinite;
  border-color: var(--rp-secondary);
}

.rp-card-2::after {
  background: var(--rp-secondary);
  box-shadow: 0 0 10px var(--rp-secondary);
}

@keyframes float1 {
  0%, 100% { transform: translateY(0) rotateY(25deg) rotateZ(-10deg); }
  50% { transform: translateY(-30px) rotateY(20deg) rotateZ(-10deg); }
}

@keyframes float2 {
  0%, 100% { transform: translateY(0) rotateY(-25deg) rotateZ(10deg); }
  50% { transform: translateY(30px) rotateY(-20deg) rotateZ(10deg); }
}

/* ========== 导航栏 ========== */
.rp-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--rp-nav-height);
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rp-border);
  z-index: 100;
}

.rp-nav-container {
  max-width: var(--rp-container-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--rp-container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rp-nav-logo {
  font-size: var(--rp-text-xl);
  font-weight: 700;
  color: var(--rp-accent);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.rp-nav-links {
  display: flex;
  gap: var(--rp-space-xl);
}

.rp-nav-links a {
  font-size: var(--rp-text-sm);
  color: var(--rp-text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color var(--rp-transition-fast);
}

.rp-nav-links a:hover {
  color: var(--rp-accent);
}

/* ========== 主内容区 ========== */
.rp-main {
  position: relative;
  z-index: 10;
}

/* ========== Hero 区域 ========== */
.rp-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--rp-space-3xl) var(--rp-container-padding);
}

.rp-hero-card {
  position: relative;
  text-align: center;
  border: 1px solid var(--rp-border);
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(10px);
  padding: 60px 80px;
  clip-path: polygon(
    20px 0, 100% 0,
    100% calc(100% - 20px), calc(100% - 20px) 100%,
    0 100%, 0 20px
  );
  box-shadow: 0 0 50px rgba(0, 243, 255, 0.1);
}

/* 装饰性边角 */
.rp-hero-card::before,
.rp-hero-card::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--rp-primary);
  transition: 0.3s;
}

.rp-hero-card::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.rp-hero-card::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

/* Glitch 标题 */
.rp-glitch-title {
  font-size: var(--rp-text-5xl);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 5px;
  position: relative;
  color: var(--rp-text-color);
  margin-bottom: 20px;
  text-shadow: 2px 2px var(--rp-secondary);
}

.rp-glitch-title::before,
.rp-glitch-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--rp-bg-color);
}

.rp-glitch-title::before {
  left: 2px;
  text-shadow: -1px 0 #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.rp-glitch-title::after {
  left: -2px;
  text-shadow: -1px 0 #00fff9;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(12px, 9999px, 32px, 0); }
  5% { clip: rect(80px, 9999px, 90px, 0); }
  10% { clip: rect(40px, 9999px, 45px, 0); }
  100% { clip: rect(0, 0, 0, 0); }
}

@keyframes glitch-anim2 {
  0% { clip: rect(60px, 9999px, 70px, 0); }
  5% { clip: rect(10px, 9999px, 20px, 0); }
  10% { clip: rect(90px, 9999px, 95px, 0); }
  100% { clip: rect(0, 0, 0, 0); }
}

.rp-hero-subtitle {
  font-size: var(--rp-text-base);
  color: var(--rp-primary);
  letter-spacing: 3px;
  margin-bottom: 50px;
  text-transform: uppercase;
}

.rp-hero-subtitle span {
  opacity: 0.7;
  font-size: var(--rp-text-sm);
  margin-left: 10px;
  color: white;
}

.rp-hero-desc {
  max-width: 500px;
  margin: 0 auto 40px auto;
  line-height: 1.8;
  color: #aaa;
  font-family: var(--rp-font-sans);
}

.rp-hero-actions {
  display: flex;
  gap: var(--rp-space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== 功能展示区域 ========== */
.rp-features {
  padding: var(--rp-space-3xl) var(--rp-container-padding);
  background: rgba(10, 10, 10, 0.9);
  position: relative;
}

.rp-features-container {
  max-width: var(--rp-container-max);
  margin: 0 auto;
}

.rp-section-title {
  font-size: var(--rp-text-3xl);
  text-align: center;
  margin-bottom: var(--rp-space-3xl);
  color: var(--rp-text-primary);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.rp-section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--rp-accent);
  margin: var(--rp-space-md) auto 0;
  box-shadow: 0 0 10px var(--rp-accent);
}

.rp-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--rp-space-xl);
}

/* ========== 价格区域 ========== */
.rp-pricing {
  padding: var(--rp-space-3xl) var(--rp-container-padding);
}

.rp-pricing-container {
  max-width: var(--rp-container-max);
  margin: 0 auto;
  display: flex;
  gap: var(--rp-space-xl);
  justify-content: center;
  align-items: stretch;
}

.rp-pricing-card {
  position: relative;
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--rp-border);
  clip-path: polygon(
    20px 0, 100% 0,
    100% calc(100% - 20px), calc(100% - 20px) 100%,
    0 100%, 0 20px
  );
  flex: 0 0 450px;
  max-width: 450px;
}

.rp-pricing-card::before,
.rp-pricing-card::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--rp-primary);
}

.rp-pricing-card::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}

.rp-pricing-card::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

.rp-pricing-content {
  padding: var(--rp-space-3xl);
  text-align: center;
}

.rp-pricing-title {
  font-size: var(--rp-text-2xl);
  margin-bottom: var(--rp-space-lg);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.rp-pricing-price {
  margin-bottom: var(--rp-space-xl);
}

.rp-pricing-currency {
  font-size: var(--rp-text-2xl);
  color: var(--rp-accent);
  vertical-align: top;
}

.rp-pricing-amount {
  font-size: var(--rp-text-5xl);
  font-weight: 700;
  color: var(--rp-accent);
  text-shadow: 0 0 30px var(--rp-accent-glow);
}

.rp-pricing-features {
  margin-bottom: var(--rp-space-xl);
  text-align: left;
}

.rp-pricing-features li {
  padding: var(--rp-space-sm) 0;
  color: var(--rp-text-secondary);
  position: relative;
  padding-left: var(--rp-space-lg);
}

.rp-pricing-features li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--rp-accent);
}

/* ========== 页脚 ========== */
.rp-footer {
  padding: var(--rp-space-xl) var(--rp-container-padding);
  border-top: 1px solid var(--rp-border);
  background: rgba(5, 5, 5, 0.9);
}

.rp-footer-container {
  max-width: var(--rp-container-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rp-footer-copyright {
  font-size: var(--rp-text-sm);
  color: var(--rp-text-muted);
}

.rp-footer-links {
  display: flex;
  gap: var(--rp-space-lg);
}

.rp-footer-links a {
  font-size: var(--rp-text-sm);
  color: var(--rp-text-muted);
  text-transform: uppercase;
}

.rp-footer-links a:hover {
  color: var(--rp-accent);
}
