@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=VT323&family=Noto+Sans+JP:wght@400;700&family=Pirata+One&family=Bangers&family=Permanent+Marker&family=Trade+Winds&family=Special+Elite&family=Black+Ops+One&family=Creepster&family=Mali:wght@400;700&family=Shrikhand&family=Press+Start+2P&family=Orbitron:wght@700;900&display=swap');

/* --- Corporate Theme Tokens (DEFAULT) --- */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --text-primary: #0f172a; 
  --text-secondary: #475569; 
  --accent-color: #3b82f6; 
  --accent-hover: #2563eb;
  
  --nav-bg: rgba(248, 250, 252, 0.95);
  --card-bg: rgba(255, 255, 255, 0.95);
  --border-color: #cbd5e1;

  --font-main: 'Outfit', sans-serif;
  --font-mono: 'VT323', monospace;
  --font-jp: 'Noto Sans JP', sans-serif;
  --font-theme-header: 'Outfit', sans-serif; 
  
  --transition: all 0.2s ease-out;
  --border-radius: 8px; 
  
  --cursor-default: auto;
  --cursor-pointer: pointer;
}

/* --- Cyberpunk Theme --- */
[data-theme="cyberpunk"] {
  --bg-primary: #050505;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #111;
  --text-primary: #fcee0a; 
  --text-secondary: #00f0ff; 
  --accent-color: #ff003c; 
  --accent-hover: #ff5400;
  
  --nav-bg: rgba(5, 5, 5, 0.95);
  --card-bg: rgba(10, 10, 10, 0.9);
  --border-color: #00f0ff;

  --font-theme-header: 'Orbitron', sans-serif; 
  --border-radius: 0px; 
  
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>⌖</text></svg>") 12 12, auto;
  --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🦾</text></svg>") 12 12, pointer;
}

/* --- One Piece Theme --- */
[data-theme="onepiece"] {
  --bg-primary: #021a2f; 
  --bg-secondary: #0a2f4d;
  --bg-tertiary: #1b4b73;
  --text-primary: #f2a900; 
  --text-secondary: #e8e8e8; 
  --accent-color: #c1121f; 
  --accent-hover: #780000;
  --nav-bg: rgba(2, 26, 47, 0.95);
  --card-bg: rgba(10, 47, 77, 0.9);
  --border-color: #f2a900;
  --font-theme-header: 'Pirata One', cursive;
  --border-radius: 8px; 
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>⚓</text></svg>") 12 12, auto;
  --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🏴‍☠️</text></svg>") 12 12, pointer;
}

/* --- One Punch Man Theme --- */
[data-theme="opm"] {
  --bg-primary: #121212; 
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-primary: #ffc300; 
  --text-secondary: #ffffff; 
  --accent-color: #e63946; 
  --accent-hover: #d90429;
  --nav-bg: rgba(18, 18, 18, 0.95);
  --card-bg: rgba(26, 26, 26, 0.9);
  --border-color: #ffc300;
  --font-theme-header: 'Bangers', cursive;
  --border-radius: 4px;
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>✊</text></svg>") 12 12, auto;
  --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>💥</text></svg>") 12 12, pointer;
}

/* --- Dandadan Theme --- */
[data-theme="dandadan"] {
  --bg-primary: #0a001a; 
  --bg-secondary: #120033;
  --bg-tertiary: #250066;
  --text-primary: #00ffcc; 
  --text-secondary: #e0e0e0; 
  --accent-color: #ff007f; 
  --accent-hover: #ff4d94;
  --nav-bg: rgba(10, 0, 26, 0.95);
  --card-bg: rgba(18, 0, 51, 0.9);
  --border-color: #00ffcc;
  --font-theme-header: 'Permanent Marker', cursive;
  --border-radius: 12px;
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🛸</text></svg>") 12 12, auto;
  --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>👻</text></svg>") 12 12, pointer;
}

/* --- Dragon Ball Daima Theme --- */
[data-theme="daima"] {
  --bg-primary: #f0fdf4; 
  --bg-secondary: #ffedd5; 
  --bg-tertiary: #f97316;
  --text-primary: #ea580c; 
  --text-secondary: #374151; 
  --accent-color: #22c55e; 
  --accent-hover: #16a34a;
  --nav-bg: rgba(240, 253, 244, 0.95);
  --card-bg: rgba(255, 237, 213, 0.9);
  --border-color: #22c55e;
  --font-theme-header: 'Mali', cursive;
  --border-radius: 16px; 
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🐉</text></svg>") 12 12, auto;
  --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>✨</text></svg>") 12 12, pointer;
}

/* --- Death Note Theme --- */
[data-theme="deathnote"] {
  --bg-primary: #050505; 
  --bg-secondary: #111111; 
  --bg-tertiary: #222222;
  --text-primary: #dc2626; 
  --text-secondary: #e5e5e5; 
  --accent-color: #ef4444; 
  --accent-hover: #b91c1c;
  --nav-bg: rgba(5, 5, 5, 0.95);
  --card-bg: rgba(17, 17, 17, 0.9);
  --border-color: #dc2626;
  --font-theme-header: 'Special Elite', monospace;
  --border-radius: 2px; 
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>📓</text></svg>") 12 12, auto;
  --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🍎</text></svg>") 12 12, pointer;
}

/* --- Dr. Stone Theme --- */
[data-theme="drstone"] {
  --bg-primary: #1b2021; 
  --bg-secondary: #2c363f;
  --bg-tertiary: #424f5a;
  --text-primary: #76ff03; 
  --text-secondary: #e0e0e0; 
  --accent-color: #f2f2f2; 
  --accent-hover: #cccccc;
  --nav-bg: rgba(27, 32, 33, 0.95);
  --card-bg: rgba(44, 54, 63, 0.9);
  --border-color: #76ff03;
  --font-theme-header: 'Special Elite', monospace;
  --border-radius: 6px;
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🧪</text></svg>") 12 12, auto;
  --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>💡</text></svg>") 12 12, pointer;
}

/* --- Jujutsu Kaisen Theme --- */
[data-theme="jjk"] {
  --bg-primary: #0a0a0a; 
  --bg-secondary: #1f0000; 
  --bg-tertiary: #2e004f; 
  --text-primary: #ff4444; 
  --text-secondary: #e0e0e0; 
  --accent-color: #7b1fa2; 
  --accent-hover: #4a148c;
  --nav-bg: rgba(10, 10, 10, 0.95);
  --card-bg: rgba(46, 0, 79, 0.9);
  --border-color: #d32f2f;
  --font-theme-header: 'Creepster', cursive; 
  --border-radius: 0px; 
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>👁️</text></svg>") 12 12, auto;
  --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🤞</text></svg>") 12 12, pointer;
}

/* --- Doraemon Theme --- */
[data-theme="doraemon"] {
  --bg-primary: #fdfdfd; 
  --bg-secondary: #e6f7ff; 
  --bg-tertiary: #0096d6; 
  --text-primary: #004d80; 
  --text-secondary: #333333; 
  --accent-color: #e30022; 
  --accent-hover: #ffcc00;
  --nav-bg: rgba(253, 253, 253, 0.95);
  --card-bg: rgba(230, 247, 255, 0.95);
  --border-color: #0096d6;
  --font-theme-header: 'Mali', cursive;
  --border-radius: 20px; 
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🛎️</text></svg>") 12 12, auto;
  --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🚁</text></svg>") 12 12, pointer;
}

/* --- JoJo DIU Theme --- */
[data-theme="jojo"] {
  --bg-primary: #f0e68c; 
  --bg-secondary: #dda0dd; 
  --bg-tertiary: #ba55d3; 
  --text-primary: #4b0082; 
  --text-secondary: #2e004f; 
  --accent-color: #ff1493; 
  --accent-hover: #c71585;
  --nav-bg: rgba(240, 230, 140, 0.95);
  --card-bg: rgba(221, 160, 221, 0.9);
  --border-color: #4b0082;
  --font-theme-header: 'Shrikhand', cursive;
  --border-radius: 0px 15px 0px 15px; 
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>💎</text></svg>") 12 12, auto;
  --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🏹</text></svg>") 12 12, pointer;
}

/* --- Pokemon Theme (Alola) --- */
[data-theme="pokemon"] {
  --bg-primary: #e0f7fa; 
  --bg-secondary: #b2ebf2; 
  --bg-tertiary: #80deea; 
  --text-primary: #01579b; 
  --text-secondary: #006064; 
  --accent-color: #e65100; 
  --accent-hover: #ff9800;
  --nav-bg: rgba(224, 247, 250, 0.95);
  --card-bg: rgba(178, 235, 242, 0.95);
  --border-color: #ff9800;
  --font-theme-header: 'Mali', cursive;
  --border-radius: 20px; 
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🌺</text></svg>") 12 12, auto;
  --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🌊</text></svg>") 12 12, pointer;
}

/* --- Super Mario Theme --- */
[data-theme="mario"] {
  --bg-primary: #fdf6e3; 
  --bg-secondary: #fef08a; 
  --bg-tertiary: #fde047; 
  --text-primary: #e52521; 
  --text-secondary: #1a1a1a; 
  --accent-color: #43b047; 
  --accent-hover: #049cd8;
  --nav-bg: rgba(253, 246, 227, 0.95);
  --card-bg: rgba(254, 240, 138, 0.95);
  --border-color: #e52521;
  --font-theme-header: 'Bangers', cursive;
  --border-radius: 10px; 
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🍄</text></svg>") 12 12, auto;
  --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🌟</text></svg>") 12 12, pointer;
}

/* --- Mob Psycho 100 Theme --- */
[data-theme="mobpsycho"] {
  --bg-primary: #050510; 
  --bg-secondary: #15102a; 
  --bg-tertiary: #2a1b4a; 
  --text-primary: #00ffcc; 
  --text-secondary: #e0e0e0; 
  --accent-color: #ff0055; 
  --accent-hover: #ccff00;
  --nav-bg: rgba(5, 5, 16, 0.95);
  --card-bg: rgba(21, 16, 42, 0.95);
  --border-color: #ff0055;
  --font-theme-header: 'Creepster', cursive;
  --border-radius: 0px; 
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>👽</text></svg>") 12 12, auto;
  --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>👻</text></svg>") 12 12, pointer;
}

/* --- Tengen Toppa Gurren Lagann (SECRET) --- */
[data-theme="gurren"] {
  --bg-primary: #000000; 
  --bg-secondary: #220000;
  --bg-tertiary: #440000;
  --text-primary: #39ff14; 
  --text-secondary: #ffffff; 
  --accent-color: #ff0000; 
  --accent-hover: #ff4500;
  --nav-bg: rgba(0, 0, 0, 0.95);
  --card-bg: rgba(34, 0, 0, 0.9);
  --border-color: #39ff14;
  --font-theme-header: 'Black Ops One', cursive;
  --border-radius: 20px 0px 20px 0px; 
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>🌪️</text></svg>") 12 12, auto;
  --cursor-pointer: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' style='font-size:20px'><text y='20'>😎</text></svg>") 12 12, pointer;
}

/* --- Reset & Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- Themed Scrollbars --- */
::-webkit-scrollbar {
  width: 14px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: var(--border-radius);
  border: 3px solid var(--bg-secondary);
  transition: var(--transition);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-primary);
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  position: relative;
  cursor: var(--cursor-default);
  z-index: 1;
}

@keyframes pulse-backdrop {
  0% { transform: scale(1); opacity: 0.2; }
  100% { transform: scale(1.2); opacity: 0.5; }
}

body::before {
  content: " ";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 50%, var(--bg-tertiary) 0%, var(--bg-primary) 80%);
  z-index: -1;
  pointer-events: none;
  animation: pulse-backdrop 8s infinite alternate ease-in-out;
}

a, button, select { cursor: var(--cursor-pointer); }
a { text-decoration: none; color: var(--accent-color); transition: var(--transition); font-weight: 600; }
a:hover { color: var(--text-primary); text-shadow: 0 0 5px var(--text-primary); }

img { max-width: 100%; height: auto; display: block; filter: contrast(1.2) saturate(1.2); }
ul { list-style: none; }

/* --- Top Navigation --- */
.navbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  padding: 1.5rem 5%;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(5px);
  border-bottom: 2px solid var(--border-color);
  box-shadow: 0 0 10px var(--border-color);
}

.logo { 
  font-size: 2rem; font-family: var(--font-theme-header); font-weight: 700; 
  color: var(--text-primary); text-shadow: 2px 2px 5px var(--bg-primary), -2px -2px 0px var(--accent-color); letter-spacing: 1px;
}

.nav-links { display: flex; align-items: center; gap: 2rem; transition: var(--transition); }

.nav-links a {
  color: var(--text-primary); font-family: var(--font-theme-header);
  font-size: 1.3rem; letter-spacing: 2px;
  text-shadow: 2px 2px 5px var(--bg-primary);
}
.nav-links a:hover { animation: glitch-skew 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite; color: var(--accent-color); }

.theme-selector {
  background: var(--bg-tertiary); color: var(--text-primary);
  border: 2px solid var(--accent-color); padding: 0.5rem;
  font-family: var(--font-theme-header); font-size: 1.1rem;
  cursor: var(--cursor-pointer); border-radius: var(--border-radius); outline: none; transition: var(--transition);
  max-width: 180px; text-overflow: ellipsis;
}
.theme-selector:hover { box-shadow: 0 0 10px var(--accent-color); }
.theme-selector option { background: var(--bg-primary); color: var(--text-primary); }

/* --- Settings Dropdown --- */
.settings-dropdown {
  position: relative;
  display: inline-block;
  margin-left: 15px;
}
.settings-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}
.settings-btn:hover { box-shadow: 0 0 10px var(--accent-color); }
.settings-content {
  display: none;
  position: absolute;
  right: 0;
  top: 120%;
  background-color: var(--card-bg);
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  z-index: 1000;
  backdrop-filter: blur(5px);
}
.settings-dropdown:hover .settings-content, .settings-dropdown:focus-within .settings-content {
  display: block;
  animation: fadeIn 0.3s ease-out;
}
.settings-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}
.settings-group:last-child { margin-bottom: 0; }
.settings-group label {
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
  color: var(--text-secondary);
  font-weight: bold;
}
.inner-select, .inner-btn {
  width: 100%;
  margin-left: 0 !important;
  font-size: 0.85rem;
}

.mobile-menu-btn {
  display: none;
  font-size: 2rem;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: var(--cursor-pointer);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 0 5%; margin-top: 60px; position: relative;
}
.hero-content { max-width: 600px; z-index: 2; }
.jp-subtitle { font-family: var(--font-jp); color: var(--accent-color); font-size: 1.2rem; letter-spacing: 5px; margin-bottom: 0.5rem; display: block; text-shadow: 1px 1px 2px var(--bg-primary); }
.hero h1 { font-family: var(--font-theme-header); font-size: 4.5rem; line-height: 1; margin-bottom: 1rem; text-shadow: 4px 4px 0px var(--bg-primary), -2px -2px 0px var(--text-secondary); letter-spacing: 2px; }
.hero .dynamic-text { font-family: var(--font-theme-header); font-size: 2rem; color: var(--accent-color); margin-bottom: 1.5rem; min-height: 40px; text-shadow: 0 0 5px var(--accent-color); }
.hero p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 2rem; border-left: 3px solid var(--accent-color); padding-left: 15px; font-weight: 500; text-shadow: 1px 1px 2px var(--bg-primary); }

.btn {
  display: inline-block; padding: 0.8rem 2rem; background-color: transparent;
  color: var(--text-primary) !important; font-family: var(--font-theme-header); font-size: 1.2rem;
  letter-spacing: 1px; border: 2px solid var(--text-primary); border-radius: var(--border-radius);
  cursor: var(--cursor-pointer); box-shadow: 4px 4px 0px var(--bg-primary); transition: var(--transition);
}
.btn:hover { background-color: var(--text-primary); color: var(--bg-primary) !important; box-shadow: 0px 0px 0px var(--text-secondary); transform: translate(4px, 4px); }

.btn-outline { border-color: var(--accent-color); color: var(--accent-color) !important; box-shadow: 4px 4px 0px var(--border-color); }
.btn-outline:hover { background-color: var(--accent-color); color: var(--bg-primary) !important; }

.hero-image {
  position: absolute; right: 5%; top: 50%; transform: translateY(-50%);
  width: 350px; height: 350px; border: 4px solid var(--text-primary);
  box-shadow: 15px 15px 0px var(--accent-color); border-radius: var(--border-radius); z-index: 1; overflow: hidden;
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) contrast(1.5); transition: var(--transition); }
.hero-image:hover img { filter: grayscale(0%) contrast(1.2); }

/* --- Sections & Cards --- */
.section { padding: 5rem 5%; max-width: 1300px; margin: 0 auto; }
.section-title { font-family: var(--font-theme-header); font-size: 3rem; margin-bottom: 3rem; position: relative; display: inline-block; letter-spacing: 2px; text-shadow: 3px 3px 0px var(--bg-primary), -2px -2px 0px var(--border-color); }
.section-title::before { content: attr(data-kanji); position: absolute; top: -25px; left: 0; font-family: var(--font-jp); font-size: 1.5rem; color: var(--accent-color); opacity: 0.8; letter-spacing: 2px; text-shadow: none; }

.retro-marquee { background: var(--accent-color); color: var(--bg-primary); font-family: var(--font-theme-header); font-size: 1.5rem; padding: 10px 0; border-top: 2px solid var(--text-primary); border-bottom: 2px solid var(--text-primary); overflow: hidden; white-space: nowrap; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; perspective: 1000px;}

.card { 
  background: var(--card-bg); border: 2px solid var(--border-color); border-radius: var(--border-radius); 
  padding: 2rem; display: flex; flex-direction: column; position: relative; 
  cursor: var(--cursor-pointer); transform-style: preserve-3d; transition: transform 0.1s ease;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5); 
}
.card-glare {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2), transparent 60%);
  pointer-events: none; opacity: 0; transition: opacity 0.3s; border-radius: inherit; z-index: 10;
}
.card:hover .card-glare { opacity: 1; }
.card::before { content: ''; position: absolute; top: 0; left: 0; width: 10px; height: 10px; background: var(--accent-color); transform: translateZ(10px); }
.card h3 { margin-bottom: 1rem; font-size: 1.5rem; font-family: var(--font-theme-header); letter-spacing: 1px; color: var(--text-primary); transform: translateZ(30px); text-shadow: 2px 2px 2px var(--bg-primary); }
.card p { color: var(--text-secondary); margin-bottom: 1.5rem; flex-grow: 1; font-size: 1.1rem; transform: translateZ(20px); font-weight: 500; line-height: 1.7;}
.card .card-footer { margin-top: auto; transform: translateZ(20px);}

.skill-bar-container { margin-bottom: 1.5rem; }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-weight: 600;}
.skill-bar { width: 100%; height: 10px; border: 1px solid var(--text-primary); background: transparent; padding: 2px;}
.skill-progress { height: 100%; background: var(--text-primary); box-shadow: 0 0 5px var(--text-primary);}

.timeline { position: relative; padding-left: 2rem; border-left: 4px dashed var(--border-color); }
.timeline-item { position: relative; margin-bottom: 3rem; transition: var(--transition); padding: 10px; border-radius: var(--border-radius); background: transparent;}
.timeline-item:hover { transform: scale(1.02) translateX(10px); background: var(--card-bg); box-shadow: 0 0 15px var(--border-color); }
.timeline-item::before { content: ''; position: absolute; left: -2.6rem; top: 0; width: 1.5rem; height: 1.5rem; background: var(--bg-primary); border: 4px solid var(--accent-color); border-radius: var(--border-radius); transition: var(--transition); }
.timeline-item:hover::before { background: var(--accent-color); box-shadow: 0 0 10px var(--accent-color); }
.timeline-date { color: var(--text-primary); font-family: var(--font-theme-header); font-size: 1.4rem; margin-bottom: 0.5rem; display: block; letter-spacing: 1px;}
.timeline-title { font-size: 1.5rem; margin-bottom: 0.5rem; font-family: var(--font-theme-header); letter-spacing: 1px;}
.timeline-subtitle { color: var(--accent-color); font-weight: 600; margin-bottom: 1rem; font-family: var(--font-jp);}
.timeline-item p { font-size: 1.1rem; line-height: 1.7; color: var(--text-primary); }

.terminal { background: var(--bg-secondary); border: 2px solid var(--border-color); border-radius: var(--border-radius); padding: 1.5rem; font-family: var(--font-mono); color: var(--text-primary); box-shadow: inset 0 0 10px rgba(0,0,0,0.2); }
.terminal-header { border-bottom: 1px dashed var(--border-color); padding-bottom: 10px; margin-bottom: 15px; color: var(--accent-color); font-weight: bold; }
.terminal ul li { margin-bottom: 10px; color: var(--text-secondary); }
.terminal ul li::before { content: '>_ '; color: var(--accent-color); font-weight: bold; margin-right: 5px; }

/* --- Interactive Anime Companion --- */
@keyframes floating-avatar {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

.anime-companion {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  cursor: var(--cursor-pointer); display: flex; flex-direction: column; align-items: center;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.anime-companion:hover { transform: scale(1.2); }
.companion-sprite { 
  width: 120px; height: 120px; object-fit: contain; 
  padding: 10px;
  border-radius: 50%;
  border: 3px solid var(--accent-color);
  background: var(--bg-primary);
  animation: floating-avatar 3s ease-in-out infinite; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.5), 0 0 10px var(--accent-color);
}
.speech-bubble {
  background: var(--bg-secondary); color: var(--text-primary);
  border: 2px solid var(--border-color); border-radius: 10px; padding: 10px;
  font-family: var(--font-theme-header); font-size: 1.2rem; margin-bottom: 10px;
  opacity: 0; transform: translateY(10px); transition: all 0.3s ease; pointer-events: none;
  white-space: nowrap; box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.anime-companion:hover .speech-bubble { opacity: 1; transform: translateY(0); }
.speech-bubble::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); border-width: 10px 10px 0; border-style: solid; border-color: var(--border-color) transparent transparent transparent; }

/* --- Cinematic Konami Overlay --- */
.cinematic-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: #000; z-index: 10000;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.5s ease;
}
.cinematic-overlay.active {
  opacity: 1; pointer-events: all;
}
.cinematic-overlay img {
  width: 200px; height: 200px; object-fit: contain;
  margin-bottom: 2rem;
  animation: floating-avatar 2s infinite ease-in-out;
}
.cinematic-overlay h1 {
  font-family: 'Black Ops One', cursive; color: #ff0000;
  font-size: 4rem; text-shadow: 0 0 20px #ff0000;
  text-align: center;
}

/* --- Glitch Animations --- */
@keyframes glitch-skew {
  0% { transform: skew(0deg); }
  20% { transform: skew(-20deg); color: var(--accent-color); }
  40% { transform: skew(20deg); color: var(--text-primary); }
  60% { transform: skew(-10deg); color: var(--text-secondary); }
  80% { transform: skew(10deg); color: var(--accent-color); }
  100% { transform: skew(0deg); }
}

@keyframes secret-unlock-flash {
  0% { filter: invert(0) blur(0px); transform: scale(1); }
  10% { filter: invert(1) blur(5px) hue-rotate(90deg); transform: scale(1.05); }
  20% { filter: invert(0) blur(0px); transform: scale(1); }
  30% { filter: invert(1) blur(10px) hue-rotate(180deg); transform: scale(0.95); }
  100% { filter: invert(0) blur(0px); transform: scale(1); }
}

.secret-unlocked { animation: secret-unlock-flash 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; }
.glitch-hover:hover { animation: glitch-skew 0.2s linear infinite; }

.sandevistan-active {
  animation: sandevistan 0.1s linear infinite alternate;
  filter: hue-rotate(90deg) contrast(150%) saturate(200%);
}
@keyframes sandevistan {
  from { transform: translateX(-5px) skewX(-2deg); }
  to { transform: translateX(5px) skewX(2deg); }
}

/* --- Hover Easter Eggs --- */
.card::after {
  content: "👀";
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 0.5rem;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 100;
}
.card:hover::after {
  opacity: 1;
  transform: translateY(-5px) scale(3);
}

.floating-easter-egg {
  position: fixed;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  font-weight: bold;
  color: var(--accent-color);
  text-shadow: 0 0 10px var(--text-primary);
  pointer-events: none;
  z-index: 9999;
  animation: float-up-fade 4s ease-out forwards;
}
@keyframes float-up-fade {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  20% { transform: translate(-50%, -100%) scale(1.2); opacity: 1; }
  80% { transform: translate(-50%, -300%) scale(1); opacity: 0.8; }
  100% { transform: translate(-50%, -400%) scale(0.8); opacity: 0; }
}

/* --- Dynamic Cursor Glow --- */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--accent-color) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.12;
  z-index: 0;
  transition: transform 0.1s ease-out;
}

/* --- Interesting Additions --- */
::selection {
  background: var(--accent-color);
  color: var(--bg-primary);
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.click-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0) translate(-50%, -50%);
  transform-origin: 0 0;
  animation: ripple-animation 0.6s linear;
  background-color: var(--accent-color);
  opacity: 0.5;
  pointer-events: none;
  z-index: 10000;
}
@keyframes ripple-animation {
  to { transform: scale(15) translate(-50%, -50%); opacity: 0; }
}

/* Footer */
footer { text-align: center; padding: 2rem 5%; border-top: 2px solid var(--border-color); margin-top: 4rem; font-family: var(--font-theme-header); font-size: 1.2rem; }
.easter-egg { font-size: 0.8rem; color: var(--bg-tertiary); margin-top: 20px; font-family: var(--font-mono); cursor: var(--cursor-pointer);}
.easter-egg:hover { color: var(--accent-color); }

/* --- Responsive Layout Adjustments --- */
@media (max-width: 900px) {
  .hero-image { display: none; }
  .hero h1 { font-size: 3rem; }
  .mobile-menu-btn { display: block; }
  
  .nav-links {
    position: absolute; top: 100%; left: 0; width: 100%;
    background: var(--nav-bg); flex-direction: column; padding: 2rem 0;
    border-bottom: 2px solid var(--border-color);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); 
  }
  .nav-links.active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
  .nav-links a { font-size: 1.5rem; margin-bottom: 1rem; }
  .theme-selector { width: 80%; text-align: center; margin-top: 1rem; max-width: 100%; white-space: normal; height: auto; }
  .grid-3 { grid-template-columns: 1fr; }
  .anime-companion { bottom: 10px; right: 10px; }
  .companion-sprite { width: 60px; height: 60px; }
  .cinematic-overlay h1 { font-size: 2rem; }
}
