/* ========================================
   🔄 共通ベーススタイル - base.css
   ======================================== */

/* ===== CSS Variables ===== */
:root {
  --primary: #5c6ac4;
  --primary-dark: #3d4a91;
  --accent: #fbbc05;
  --text: #2d3748;
  --bg-light: #f9fafb;
  --white: #ffffff;
  --border: #ccc;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-dark: rgba(0, 0, 0, 0.2);
}

/* ===== Universal Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Poppins", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-light);
  color: var(--text);
  line-height: 1.6;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  font-weight: 600;
  line-height: 1.2;
}

/* ===== Layout Utilities ===== */
.container {
  flex: 1;
  display: flex;
  min-height: 0;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  padding-bottom: 110px; /* 手札エリア用の余白 */
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* ===== Responsive Breakpoints ===== */
@media (max-width: 768px) {
  .main-content {
    padding: 15px;
    padding-bottom: 110px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 12px;
    padding-bottom: 110px;
  }
}

/* ===== Animation Utilities ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes bounce {
  0%,
  20%,
  53%,
  80%,
  100% {
    transform: translateY(0);
  }
  40%,
  43% {
    transform: translateY(-10px);
  }
  70% {
    transform: translateY(-5px);
  }
  90% {
    transform: translateY(-2px);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}
.slide-in {
  animation: slideIn 0.4s ease-out;
}
.bounce {
  animation: bounce 1s ease-in-out;
}

/* ===== Utility Classes ===== */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}

.hidden {
  display: none !important;
}
.invisible {
  visibility: hidden;
}

.flex {
  display: flex;
}
.flex-column {
  flex-direction: column;
}
.flex-center {
  justify-content: center;
  align-items: center;
}
.flex-between {
  justify-content: space-between;
}
.flex-around {
  justify-content: space-around;
}

.w-full {
  width: 100%;
}
.h-full {
  height: 100%;
}

.p-0 {
  padding: 0;
}
.p-1 {
  padding: 0.25rem;
}
.p-2 {
  padding: 0.5rem;
}
.p-3 {
  padding: 0.75rem;
}
.p-4 {
  padding: 1rem;
}

.m-0 {
  margin: 0;
}
.m-1 {
  margin: 0.25rem;
}
.m-2 {
  margin: 0.5rem;
}
.m-3 {
  margin: 0.75rem;
}
.m-4 {
  margin: 1rem;
}

/* ===== Focus and Accessibility ===== */
*:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Selection Styling ===== */
::selection {
  background: var(--accent);
  color: var(--text);
}

::-moz-selection {
  background: var(--accent);
  color: var(--text);
}
