@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* --- Design System Variables --- */
:root {
  /* Color Palette */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(22, 30, 46, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  
  --color-primary: #8b5cf6;     /* Violet */
  --color-primary-glow: rgba(139, 92, 246, 0.35);
  --color-secondary: #06b6d4;   /* Cyan */
  --color-secondary-glow: rgba(6, 182, 212, 0.35);
  --color-accent: #ec4899;      /* Pink */
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  /* Typography */
  --font-heading: 'Outfit', 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
  
  /* Spacing */
  --container-max-width: 1200px;
  --header-height: 70px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Gradients (Atmosphere) */
.bg-glow-1 {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, rgba(0,0,0,0) 70%);
  top: -10%;
  right: -10%;
  z-index: -1;
  pointer-events: none;
}

.bg-glow-2 {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-secondary-glow) 0%, rgba(0,0,0,0) 70%);
  bottom: 20%;
  left: -10%;
  z-index: -1;
  pointer-events: none;
}

/* --- Typography Helpers --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

/* --- Layout Components --- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: var(--transition-normal);
}

header.scrolled {
  background-color: rgba(11, 15, 25, 0.95);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-main);
  transition: var(--transition-normal);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  padding: 160px 0 100px;
  text-align: center;
  overflow: hidden;
}

.hero-title {
  font-size: 54px;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 40%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title span {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

/* Glassmorphism Cards */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-normal);
}

.glass-panel:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.15);
}

/* Grid & Cards (Work List) */
.section-title {
  font-size: 32px;
  margin-bottom: 40px;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  margin: 12px auto 0;
  border-radius: 2px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
  margin-bottom: 60px;
}

.work-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.work-img-container {
  position: relative;
  width: 100%;
  height: 180px;
  background-color: var(--bg-secondary);
  overflow: hidden;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-img-placeholder {
  font-size: 40px;
  color: var(--text-muted);
  opacity: 0.5;
  transition: var(--transition-normal);
}

.work-card:hover .work-img-placeholder {
  transform: scale(1.1);
  opacity: 0.8;
  color: var(--color-primary);
}

.work-card:hover .work-img-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(139, 92, 246, 0.2) 100%);
  pointer-events: none;
}

.work-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: var(--transition-normal);
}

.work-card:hover .work-img-container img {
  transform: scale(1.05);
}

.work-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.work-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 99px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.tag.game {
  color: var(--color-primary);
  background-color: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.2);
}

.tag.tool {
  color: var(--color-secondary);
  background-color: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.2);
}

.tag.dev {
  color: var(--color-accent);
  background-color: rgba(236, 72, 153, 0.15);
  border-color: rgba(236, 72, 153, 0.3);
}

.work-title {
  font-size: 20px;
  margin-bottom: 10px;
}

.work-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
}

.btn-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  align-self: flex-start;
  margin-top: auto;
}

.btn-more i {
  transition: transform var(--transition-fast);
}

.work-card:hover .btn-more i {
  transform: translateX(4px);
}

.work-card:hover .btn-more {
  color: var(--color-secondary);
}

/* Button UI */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--text-main);
  font-weight: 600;
  border-radius: 99px;
  transition: var(--transition-normal);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.btn-primary.disabled,
.btn-primary[disabled] {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
  border: 1px solid var(--border-color);
}

/* --- Ad Placement Placeholders --- */
.ad-container {
  margin: 40px auto;
  padding: 20px;
  max-width: 728px;
  min-height: 90px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ad-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ad-placeholder-box {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.15);
  font-size: 13px;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}

/* Detail Pages Styling */
.detail-layout {
  padding: 120px 0 80px;
}

.detail-header {
  margin-bottom: 40px;
}

.detail-title-area {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.back-link:hover {
  color: var(--text-main);
}

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-img-showcase {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: var(--text-muted);
  overflow: hidden;
}

.detail-img-showcase svg {
  opacity: 0.3;
}

.detail-img-showcase img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.info-card {
  padding: 24px;
}

.info-title {
  font-size: 18px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
}

.info-list li {
  display: flex;
  justify-content: space-between;
}

.info-label {
  color: var(--text-muted);
}

.info-value {
  font-weight: 500;
  text-align: right;
}

/* Static Content Pages (Privacy, Contact, About) */
.static-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.static-title {
  font-size: 36px;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.static-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.static-content p {
  color: var(--text-muted);
  line-height: 1.8;
}

.static-content h2 {
  font-size: 22px;
  margin-top: 16px;
  color: var(--text-main);
  border-left: 4px solid var(--color-primary);
  padding-left: 12px;
}

.static-content ul {
  list-style-type: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.static-content ul li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
}

.static-content ul li::before {
  content: '•';
  color: var(--color-secondary);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

.form-control {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* --- Footer --- */
footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  margin-top: 80px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-main);
}

.copyright {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }
  
  .hero {
    padding: 120px 0 60px;
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 15px;
  }
  
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: rgba(11, 15, 25, 0.98);
    flex-direction: column;
    padding: 40px 24px;
    gap: 24px;
    transform: translateY(-100%);
    opacity: 0;
    transition: var(--transition-normal);
    pointer-events: none;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  /* Menu open states */
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* --- Fallback Modal Styles --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 16, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 550px;
  padding: 32px;
  position: relative;
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-main);
  transform: rotate(90deg);
}

.modal-title {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text-main);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.modal-action-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.btn-secondary-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-secondary);
}

.copy-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.copy-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.copy-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.copy-input-wrapper {
  display: flex;
  gap: 8px;
}

.copy-input-wrapper input,
.copy-input-wrapper textarea {
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.2);
}

.btn-copy {
  padding: 0 16px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--color-primary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
}

.btn-copy:hover {
  background: var(--color-primary);
  color: var(--text-main);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.btn-copy.copied {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

