@charset "UTF-8";

/* ========== リセット ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ========== 参照 ========== */
:root {
  --bg-gradient: linear-gradient(135deg, #e0f7fa, #f1f8e9);
  --button-gradient: linear-gradient(to bottom right,
      #fffde7 0%,
      #f0fbff 30%,
      #b3e5fc 70%,
      #4fc3f7 100%);
  --hover-gradient: linear-gradient(to bottom right,
      #f9fbe7 0%,
      #b3e5fc 30%,
      #4fc3f7 70%,
      #0288d1 100%);
  --item-gradient: linear-gradient(to bottom right,
      #e1f5fe 0%,
      #b3e5fc 30%,
      #4fc3f7 70%,
      #0288d1 100%);
  --warning-color: #d9534f;
}

/* ========== 共通 ========== */
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background-color: #fbfbfb;
  color: #333;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.body-wrapper {
  display: grid;
  grid-template-columns: 20% 60% 20%;
  width: 100vw;
  height: 100vh;
}

.title {
  margin-bottom: 1.5rem;
}

.subtitle {
  margin-bottom: 0;
}

.preview-area {
  height: 100vh;
  padding: 1.5rem;
  background: var(--bg-gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}


/* ダミーボックス */
.box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--item-gradient);
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  color: #fff;
  font-weight: bold;
  font-size: 0.9rem;
}

/* ========== HIDDEN CLASS ========== */
.hidden {
  display: none;
}

/* ========== CODE PANEL ========== */
.code-wrapper {
  height: 100vh;
  padding: 1rem 0.8rem;
  display: flex;
  flex-direction: column;
}

.code-wrapper h2 {
  font-size: 1.2rem;
  color: #222;
}

.code-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: auto;
}

.html-container,
.css-container {
  height: 100%;
  background: #ffffff;
  border: 1px solid #eee;
  margin-bottom: 0.5rem;
  overflow: auto;
}

.html-container pre,
.css-container pre {
  background: transparent;
  padding: 1rem;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow: auto;
  border-radius: 0;
}

/* ========== COPY + RESET BUTTON ========== */
.html-button,
.css-button,
.reset-button {
  width: 100%;
  display: inline-block;
  margin-bottom: 24px;
  padding: 0.7rem 1.5rem;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  background: var(--button-gradient);
  color: #006064;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.html-button:hover,
.css-button:hover,
.reset-button:hover {
  background: var(--hover-gradient);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

/* ========== タブUI（右上、Shadowベース） ========== */
.right-side {
  height: 100vh;
}

.tab-switcher {
  display: flex;
  justify-content: flex-start;
}

.tab-button {
  width: 50%;
  padding: 12px 18px;
  font-size: 18px;
  border: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-weight: bold;
  color: #888;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.tab-button:hover {
  background: #d8d8d8;
}

/* アクティブなタブ（control-panelと一体化） */
.tab-button.active {
  background: #fbfbfb;
  /* ← .control-panel の背景に合わせる */
  color: #000;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.15);
  z-index: 2;
  position: relative;
}

/* 非activeをグレーアウト */
.tab-button:not(.active) {
  opacity: 0.6;
}

/* ========== CONTROL PANEL ========== */
.control-panel {
  height: 100vh;
  padding: 1rem 0.8rem;
  background: #fbfbfb;
  overflow-y: auto;
}

.control-panel h2 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #222;
}
