/* Reset and base styles */
html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    background: #0a0a0a;
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* Sections container */
.sections-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Section base styles */
section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 70px 20px 20px;
    box-sizing: border-box;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex-shrink: 0;
}

/* Content containers */
.section-content {
    width: min(90%, 800px);
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 157, 0.1);
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.section-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero section specific styles */
.hero-section {
    position: relative;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(90%, 800px);
}

/* Game section specific styles */
.game-container {
    width: min(90%, 800px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#gameCanvas {
    width: 100%;
    max-width: 800px;
    height: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 157, 0.2);
}

/* Feature boxes */
.feature-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid rgba(0, 255, 157, 0.1);
    backdrop-filter: blur(10px);
}

.feature-box h3 {
    color: #00ff9d;
    margin-top: 0;
}

.feature-box p {
    color: #b4ffdb;
    margin-bottom: 0;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
}

/* Contact section */
.contact-content {
    text-align: center;
}

.contact-content ul {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.contact-content li {
    margin: 1rem 0;
    font-size: 1.1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .section-content {
        padding: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 255, 157, 0.1);
    box-shadow: 0 2px 20px rgba(0, 255, 157, 0.1);
}

.nav-content {
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #00ff9d;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
    letter-spacing: 1px;
    position: relative;
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.logo:hover {
    border-color: rgba(0, 255, 157, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
    text-shadow: 0 0 15px rgba(0, 255, 157, 0.7);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    position: relative;
    overflow: hidden;
    background: rgba(0, 255, 157, 0.05);
    border: 1px solid rgba(0, 255, 157, 0.1);
    white-space: nowrap;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 255, 157, 0), rgba(0, 255, 157, 0.1), rgba(0, 255, 157, 0));
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.nav-links a:hover {
    color: #00ff9d;
    border-color: rgba(0, 255, 157, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.2);
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
}

.nav-links a:hover::before {
    transform: translateX(100%);
}

.nav-links li {
    position: relative;
}

.nav-links li.active a {
    background: rgba(0, 255, 157, 0.1);
    border-color: rgba(0, 255, 157, 0.3);
    color: #00ff9d;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
}

/* Only hide navigation on mobile */
@media (max-width: 768px) {
    .navbar {
        height: 60px;
    }

    .nav-content {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-links {
        display: none;
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

.scroll-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.scroll-dot::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 157, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.scroll-dot:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.scroll-dot.active {
    background: #00ff9d;
    box-shadow: 0 0 15px #00ff9d;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .nav-content {
        padding: 0 1rem;
    }

    .nav-links {
        display: none;
    }

    .section-content {
        width: 95%;
        padding: 1rem;
    }

    .scroll-indicator {
        right: 10px;
    }

    .scroll-dot {
        width: 8px;
        height: 8px;
    }
}

/* Section specific styles */
#hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

#about {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

#features {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

#game {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

#contact {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

/* 全体のスタイル */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #007BFF, #00CFFD);
    overflow: hidden;
    color: #0044a3;
  }
  
  /* パーティクル背景 */
  #particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
  }
  
  /* グリッド背景 */
  .grid-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 48px,
      rgba(255, 255, 255, 0.05) 50px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 48px,
      rgba(255, 255, 255, 0.05) 50px
    );
    animation: move-grid 10s linear infinite;
    z-index: 0;
  }
  
  /* グリッドの動き */
  @keyframes move-grid {
    from {
      transform: translate(-50%, -50%);
    }
    to {
      transform: translate(-52%, -52%);
    }
  }
  
  /* メインコンテンツ */
  .container {
    position: relative;
    text-align: center;
    z-index: 1;
  }
  
  /* タイピングテキスト */
  .typing {
    margin: 20px 0;
    font-size: 1rem;
    text-align: left;
    white-space: pre-line;
  }
  
  /* アニメーション付きテキスト */
  .animated-text {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 143, 190, 0.8);
    animation: pulse 2s infinite;
  }
  
  /* ボタン */
  .btn {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #007BFF;
    background-color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
  }
  
  .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
  }
  
  /* アニメーション */
  @keyframes pulse {
    0%, 100% {
      text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    }
    50% {
      text-shadow: 0 0 20px rgba(255, 255, 255, 1);
    }
  }
  
  /* レスポンシブ対応 */
  @media (max-width: 768px) {
    body {
        flex-direction: column;
        height: auto;
        padding: 20px;
    }

    .container {
        width: 100%;
        padding: 10px;
    }

    h1.animated-text {
        font-size: 1.5em;
    }

    #discord-button {
        width: 100%;
        padding: 15px;
    }
  }
  
  /* 背景アニメーション */
  .loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    font-family: 'Courier New', Courier, monospace;
    animation: backgroundAnimation 10s linear infinite;
    overflow: hidden;
    transition: opacity 1s ease-in-out, display 1s ease-in-out;
  }

  @keyframes backgroundAnimation {
    0% { background-position: 0 0; }
    100% { background-position: 100% 100%; }
  }

  .hacker-text {
    text-align: center;
    white-space: pre-wrap;
    overflow: hidden;
    border-right: .15em solid #0f0;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
  }

  @keyframes typing {
    from { width: 0 }
    to { width: 100% }
  }

  @keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #0f0; }
  }

  .hacker-text input[type="checkbox"] {
    margin-top: 20px;
    animation: fadeIn 1s ease-in-out;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* スマホ対応 */
  @media (max-width: 768px) {
    .hacker-text {
        font-size: 0.8em;
    }
    .loading-screen {
        padding: 10px;
    }
  }

  /* 背景に流れる文字のスタイル */
  .background-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: rgba(0, 255, 0, 0.1);
    font-size: 2em;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    animation: scrollText 20s linear infinite;
  }

  @keyframes scrollText {
    from { transform: translateY(100%); }
    to { transform: translateY(-100%); }
  }

  /* Enhanced Checkbox styling */
  .access-checkbox {
    position: relative;
    width: 60px;
    height: 30px;
    -webkit-appearance: none;
    background: linear-gradient(45deg, #c6c6c6, #e0e0e0);
    outline: none;
    border-radius: 15px;
    transition: background-color 0.3s, background 0.3s;
    cursor: pointer;
  }

  .access-checkbox:checked {
    background: linear-gradient(45deg, #4caf50, #66bb6a);
  }

  .access-checkbox:before {
    content: '\2713'; /* Checkmark icon */
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    background-color: #ffffff;
    transition: transform 0.3s, background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #4caf50;
  }

  .access-checkbox:checked:before {
    transform: translateX(30px);
    background-color: #ffffff;
    color: #ffffff;
  }

  /* Section Styling */
  section {
    padding: 4rem 2rem;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }

  section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  }

  /* About Section */
  .about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
  }

  .about-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
  }

  .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
  }

  .feature-item {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease;
  }

  .feature-item:hover {
    transform: translateY(-5px);
  }

  /* Features Section */
  .features-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
  }

  .feature-box {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
  }

  .feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }

  .feature-box h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
  }

  /* Contact Section */
  .contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
  }

  .contact-content ul {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
  }

  .contact-content li {
    font-size: 1.2rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
  }

  .contact-content li:hover {
    transform: scale(1.05);
    background: #000d1a;
  }

  .contact-joke {
    font-style: italic;
    color: #6c757d;
    margin-top: 2rem;
  }

  /* Responsive Design */
  @media (max-width: 768px) {
    section {
        padding: 2rem 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .features-content {
        grid-template-columns: 1fr;
    }
  }

  /* Game Section Enhanced */
  #game {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    padding: 3rem 2rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
  }

  #game::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ff9d, transparent);
    animation: scanline 2s linear infinite;
  }

  @keyframes scanline {
    0% {
      transform: translateY(-100%);
    }
    100% {
      transform: translateY(1000%);
    }
  }

  #game h2 {
    color: #fff;
    text-shadow: 0 0 10px #00ff9d,
                 0 0 20px #00ff9d,
                 0 0 30px #00ff9d;
    margin-bottom: 2.5rem;
  }

  .game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.1);
    backdrop-filter: blur(5px);
  }

  #gameCanvas {
    background: #000;
    border-radius: 10px;
    margin: 1.5rem 0;
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.2);
    border: 1px solid rgba(0, 255, 157, 0.3);
  }

  .game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
    font-family: 'Courier New', monospace;
    color: #00ff9d;
    text-shadow: 0 0 5px rgba(0, 255, 157, 0.5);
  }

  .score, .high-score {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 157, 0.3);
  }

  .game-controls {
    margin-top: 1.5rem;
  }

  #startGame {
    background: linear-gradient(45deg, #00ff9d, #00b8ff);
    color: #000;
    font-weight: bold;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.3);
  }

  #startGame:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.5);
  }

  #startGame:active {
    transform: translateY(1px);
  }

  .game-instruction {
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.8rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Game animations */
  @keyframes pulse {
    0% {
      box-shadow: 0 0 15px rgba(0, 255, 157, 0.2);
    }
    50% {
      box-shadow: 0 0 25px rgba(0, 255, 157, 0.4);
    }
    100% {
      box-shadow: 0 0 15px rgba(0, 255, 157, 0.2);
    }
  }

  #gameCanvas {
    animation: pulse 2s infinite;
  }

  /* Responsive adjustments */
  @media (max-width: 768px) {
    .game-container {
        padding: 1rem;
    }
    
    .game-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .score, .high-score {
        width: 100%;
        text-align: center;
    }
  }

  /* Global Styles */
  html {
    scroll-behavior: smooth;
  }

  /* Navigation Bar */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 255, 157, 0.2);
  }

  .nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    color: #00ff9d;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
  }

  .nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
  }

  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00ff9d;
    transition: width 0.3s ease;
  }

  .nav-links a:hover {
    color: #00ff9d;
  }

  .nav-links a:hover::after {
    width: 100%;
  }

  /* Sections */
  section {
    min-height: 100vh;
    padding: 6rem 2rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
  }

  .hero-section {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
  }

  .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, #0a0a0a 70%);
    pointer-events: none;
  }

  .hero-content {
    position: relative;
    z-index: 1;
  }

  /* Responsive Design */
  @media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    section {
        padding: 8rem 1rem 4rem;
    }
  }