*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    color: #333;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9;
    background-image: url('Gazou/top.jpg');
    background-repeat: repeat-y;
    background-attachment: fixed;
    background-position: top center;
    margin: 0;
    padding: 0;
}

header.site-header {
    text-align: center;
    padding: 20px;
    border-bottom: 4px solid #004080;
    box-sizing: border-box;
    width: 100%;
}

.header-img {
    position: relative;
    height: 300px;
    background-image: url('Gazou/1/game_3M.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.header-link {
    background-position: center;
    background-color: transparent;
    text-decoration: none;
    color: #000;
}

.header-link:visited {
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.header-link:hover {
    color: #0000CC;
    text-decoration: underline;
}

.site-footer {
    border-top: 1px solid #ccc;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.sidebar {
    background-color: white;
    width: 100%;
    text-align: center;
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.small-text {
    font-size: 1rem;
    color: #ddd;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.small-text2 {
    font-size: 1rem;
    color: #000;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    display: block;
}

.senndenn {
    color: #000;
    display: block;
    padding-top: 1em;
}

nav.site-nav ul {
    background-color: white;
    list-style-type: none;
    padding: 0;
    margin: 10px 0;
    justify-content: center;
    display: flex;
    flex-direction: row;
    gap: 20px;
    text-decoration: none;
    border-radius: 5px;
}

nav.site-nav a {
    background-color: white;
    text-decoration: none;
    font-size: 1rem;
}

.site-nav li {
    display: flex;
    flex-direction: row;
    display: block;
    justify-content: center;
}

nav.site-nav a:hover {
    color: #0000CC;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    font-family: Arial, sans-serif;
}

.nav-footer,
.profile-section {
    background-color: #f8f8f8;
    padding: 20px;
}

.footer-gap {
    height: 10px;
    background-color: transparent;
    margin: 10px 0;
}

.profile-footer {
    background-color: white;
    border-radius: 5px;
    margin-bottom: 20px;
}

.profile-footer h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.site-nav-footer ul {
    background-color: white;
    border-radius: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    color: #333;
}

.site-nav-footer a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.site-nav-footer a:hover {
    color: #0000CC;
}

.article-content {
    width: 80%;
    padding: 20px;
    background-color: white;
    text-align: center;
    margin: 20px auto;
    max-width: 800px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.article-content-kiji {
    width: 80%;
    padding: 20px;
    background-color: white;
    text-align: center;
    margin: 20px auto;
    max-width: 800px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.text-container {
    margin: 0 auto;
    top: 50%;
    left: 50%;
    text-align: center;
    background-color: white;
    border-radius: 15px;
    width: 80%;
    box-sizing: border-box;
}

.pagination {
    text-align: center;
    margin: 20px 0;
    font-family: sans-serif;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
}

.pagination a:hover {
    background-color: #eee;
}

.pagination .current {
    background-color: #333;
    color: #fff;
    font-weight: bold;
}

img.thumbnail,
.video-thumb-wrapper {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  cursor: pointer;
}

img.thumbnail:hover,
.video-thumb-wrapper:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#modal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    overflow: auto;
    text-align: center;
    border-radius: 8px;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#modal.hide {
  opacity: 0;
  transform: scale(0.3);
}

#modal-content {
    overflow: auto;
    margin: auto;
    display: block;
    width: 100%;
    max-width: 90%;
    max-height: 90%;
}

#modal-content img,
#modal-content video {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    display: block;
    margin: auto;
}

.video-thumb-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  overflow: visible;
}

.video-thumb-wrapper video {
  display: block;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.img-fit-screen {
  max-width: 90vw !important;
  max-height: 90vh !important;
  width: auto !important;
  height: auto !important;
}

.video-fit-screen {
  max-width: 100% !important;
  max-height: 100vh !important;
  width: auto !important;
  height: auto !important;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.shrinked {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: zoom-in;
}

#modal-content img:not(.shrinked),
#modal-content video:not(.shrinked) {
    width: auto;
    height: auto;
    cursor: zoom-out;
}

@keyframes modalOpenAnimation {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#modal.show {
    animation: modalOpenAnimation 0.5s ease forwards;
}

.audio-thumb-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.audio-thumbnail {
    width: 300px;
    height: 40px;
}

.audio-play-btn {
  padding: 0.5em 1em;
  font-size: 1rem;
}

.audio-button {
    display: inline-flex;
    align-items: center;
    background-color: #007BFF;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

.audio-button:hover {
    background-color: #0056b3;
}

.audio-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    fill: white;
}

.audio-label {
    user-select: none;
}

.modal-content audio {
    width: 100%;
    max-width: 500px;
    height: 40px;
    margin: 0 auto;
    display: block;
}

.close-img,
.toggle-btn-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
}

.toggle-btn-container {
  top: 60px;
}

#image-toggle-btn {
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
}

.desktop-toggle,
.mobile-toggle {
  display: none;
}

@media screen and (min-width: 1026px) {
  .desktop-toggle {
    display: flex;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
  }

  .desktop-toggle button {
    pointer-events: auto;
  }
}

@media screen and (max-width: 1025px) {
  .mobile-toggle {
    display: flex;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    gap: 10px;
    z-index: 1000;
  }

  .mobile-toggle button {
    padding: 8px 12px;
    font-size: 16px;
    border: none;
    background-color: #333;
    color: white;
    border-radius: 5px;
    cursor: pointer;
  }

  .mobile-toggle button:hover {
    background-color: #555;
  }
}

.close {
    position: fixed;
    top: 10px;
    right: 30px;
    background: #fff;
    color: #000;
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 20px;
    z-index: 1001;
    display: none;
}

.close-img {
    position: absolute;
    top: 10px;
    right: 1px;
    cursor: pointer;
    z-index: 2000;
}

.close-img img {
    width: 30px;
    height: 30px;
}

#modal.show .close {
    display: block;
}

.main-content {
    padding: 20px;
    background-color: #fff;
    max-width: 1200px;
    margin: 20px auto;
}

.visit-counter {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #666;
}

#category {
    width: 80%;
    margin: 0 auto;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    background-color: white;
    margin-bottom: 30px;
    color: #000;
}

#category h2 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-decoration: none;
}

#categorylist h1 {
  text-align: center;
}

.category-tags {
  text-align: center;
}

#home .tags {
    width: 80%;
    margin: 0 auto;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    background-color: white;
    margin-bottom: 30px;
    color: #000;
}

#home .tags .tag-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-decoration: none;
}

#home .tags a:hover {
    color: #0000CC;
    text-decoration: underline;
    border-radius: 4px;
}

#taglist .tags {
    margin-top: 2em;
    margin: 0 auto;
    text-align: center;
}

#taglist .tags h2 {
    font-size: 1.5em;
    margin-bottom: 1em;
    border-bottom: 2px solid #ccc;
    padding-bottom: 0.5em;
}

#taglist .tags.list {
    display: inline-block;
    margin: 0.4em;
    padding: 0.5em 1em;
    background-color: #f0f0f0;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    justify-content: center;
    align-items: center;
}

#taglist .tags.list:hover {
    background-color: #ddd;
}

#categorylist .category-tags {
  margin-top: 2em;
  margin: 0 auto;
  text-align: center;
}

#categorylist #category-list {
  text-align: center;
  margin-top: 2em;
}

#categorylist #category-list h2 {
}

#categorylist .category-tags.list {
  display: inline-block;
  margin: 0.4em;
  padding: 0.5em 1em;
  background-color: #f0f0f0;
  border-radius: 20px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s ease;
}

#categorylist .category-tags.list:hover {
  background-color: #ddd;
}

.contact-form {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background: Transparent;
    border-radius: 8px;
    opacity: 0;
}

.contact-form.active {
    opacity: 1;
    transform: translateX(0);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: none;
    border-radius: 5px;
}

.contact-form button {
    padding: 10px;
    background-color: #007acc;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #005f99;
}

#backToTop {
    position: fixed;
    bottom: 180px;
    right: 30px;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 10px;
    background-color: #007acc;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

#backToTop.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

#backToTop .back-icon,
#goToBottom .back-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

#goToBottom {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 10px;
    background-color: #007acc;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

#goToBottom.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

#goToBottom .back-icon img {
    display: block;
    width: 24px;
    height: auto;
}

#progress-bar-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: transparent;
    z-index: 9999;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: transparent;
    transition: width 0.25s ease-out;
}

#progress-text {
    position: absolute;
    right: 10px;
    bottom: 8px;
    font-size: 12px;
    color: #333;
    font-weight: bold;
    background: rgba(255,255,255,0.8);
    padding: 2px 6px;
    border-radius: 6px;
}

.video-label-block {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  }

.video-label {
  display: none;
  background-color: transparent;
  color: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  margin: 4px 0;
  font-size: 25px;
  border-radius: 4px;
}

.video-label-waku {
  display: none;
  background-color: transparent;
  color: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  margin: 4px 0;
  font-size: 12px;
  border-radius: 4px;
}

.play-svg {
  width: 48px;
  height: 48px;
  display: block;
  margin: 0 auto;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.video-thumb-wrapper:hover .play-svg {
  transform: scale(2);
}

.svg-wrapper {
  display: flex;
  justify-content: center;
  margin: 4px 0;
}

@media (max-width: 1025px) {
  .thumbnail,
  .video-thumb-wrapper {
    max-width: 100%;
    border: 2px solid #ccc;
    background-color: #f0f0f0;
  }

  .site-header {
      padding: 10px;
  }

  .header-link {
      font-size: 1.2em;
  }

  nav.site-nav ul {
      flex-direction: column;
  }

  .play-svg {
    width: 50px;
    height: 50px;
  }

  .video-label-block {
    display: block;
  }

  .video-label,
  .video-label-waku {
    display: block;
  }

  .svg-wrapper {
    display: block;
  }
}

@media screen and (min-width: 1026px) {
  .toggle-buttons {
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    justify-content: space-between;
    padding: 0 20px;
  }

  .svg-wrapper {
    display: block;
  }

  .video-label,
  .video-label-waku {
    display: none;
  }
}

#about {
    text-align: center;
    padding: 10px;
}

@keyframes twinkleAnimation {
  0% { opacity: 0; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(1); }
}

.twinkle-text {
  position: relative;
  color: gold;
  text-shadow: 0 0 8px rgba(255, 223, 0, 0.8), 0 0 15px gold;
  max-width: 100%;
  word-wrap: break-word;
}

.twinkle-text::before,
.twinkle-text::after {
  content: "\2726"; /* &#10022; */
  position: absolute;
  color: gold;
  font-size: 1.2em;
  opacity: 0;
  animation: twinkleAnimation 1.5s infinite ease-in-out;
}

.twinkle-text::before {
  top: -10px;
  left: -10px;
}

.twinkle-text::after {
  top: 0px;
  right: -10px;
}

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

.sparkle-text {
  font-weight: bold;
  background: linear-gradient(90deg, #f0f, #ff0, #0ff, #f0f);
  background-size: 300% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  display: inline-block;
  animation: colorFlow 3s ease-in-out infinite alternate;
}

@keyframes slideInFromRight {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(0);
  }
}

.slide-in-text {
  display: inline-block;
  animation: slideInFromRight 1s ease-out;
}

.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.back-button,
.home-button {
    font-size: 15px;
    padding: 15px 30px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 0px;
}

.back-button:hover,
.home-button:hover {
    background-color: #0056b3;
}

.home-button {
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.back-img {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-img img {
    margin-left: 0px;
    object-fit: cover;
    border-radius: 5px;
}