/**
 * 管理画面用CSS
 */

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

body {
  font-family: 'Kosugi Maru', 'Noto Sans JP', 'Inter', sans-serif;
  background-color: #000;
  color: #fff;
  line-height: 1.6;
}

/* ログインページ */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #000 0%, #1a1a2e 100%);
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
}

.login-box {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 15px;
  padding: 2.5rem;
  backdrop-filter: blur(10px);
}

.login-box h1 {
  color: #ffd700;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 700;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  color: #ffd700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid rgba(255, 215, 0, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #ffd700;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.btn-primary {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
  color: #222;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.error-message {
  background: rgba(255, 0, 0, 0.2);
  border: 1px solid rgba(255, 0, 0, 0.5);
  color: #ff6b6b;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.success-message {
  background: rgba(0, 255, 0, 0.2);
  border: 1px solid rgba(0, 255, 0, 0.5);
  color: #4caf50;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ダッシュボード */
.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 215, 0, 0.3);
  padding: 2rem;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar h2 {
  color: #ffd700;
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav ul li {
  margin-bottom: 0.5rem;
}

.sidebar nav ul li a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
}

.main-content {
  margin-left: 250px;
  padding: 2rem;
  width: calc(100% - 250px);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.header h1 {
  color: #ffd700;
  font-size: 2rem;
}

.header .user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header .user-info span {
  color: #ccc;
}

.header .btn-logout {
  padding: 0.5rem 1rem;
  background: rgba(255, 0, 0, 0.2);
  color: #ff6b6b;
  border: 1px solid rgba(255, 0, 0, 0.5);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.header .btn-logout:hover {
  background: rgba(255, 0, 0, 0.3);
}

/* コンテンツ一覧 */
.content-list {
  display: grid;
  gap: 1.5rem;
}

.content-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  transition: all 0.3s ease;
}

.content-item-thumbnail {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.content-item-thumbnail .settings-icon {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd700;
  text-decoration: none;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.content-item-thumbnail:hover .settings-icon {
  opacity: 1;
}

.content-item-thumbnail .settings-icon:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: #ffd700;
  transform: scale(1.1);
}

.content-item-thumbnail .settings-icon svg {
  width: 16px;
  height: 16px;
}

.piece-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.piece-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 0.8rem;
  text-align: center;
  padding: 0.5rem;
}

.content-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateY(-2px);
}

.content-item-info h3 {
  color: #ffd700;
  margin-bottom: 0.5rem;
}

.content-item-info p {
  color: #ccc;
  font-size: 0.9rem;
}

.piece-src {
  font-size: 0.85rem;
  color: #999;
  margin-top: 0.5rem;
  word-break: break-all;
}

.content-item-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-edit,
.btn-delete {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-edit {
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.4);
}

.btn-edit:hover {
  background: rgba(255, 215, 0, 0.3);
}

.btn-delete {
  background: rgba(255, 0, 0, 0.2);
  color: #ff6b6b;
  border: 1px solid rgba(255, 0, 0, 0.4);
}

.btn-delete:hover {
  background: rgba(255, 0, 0, 0.3);
}

.btn-add {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
  color: #222;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.btn-add:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

/* フォーム */
.form-container {
  max-width: 800px;
  margin: 0 auto;
}

.form-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.form-section h2 {
  color: #ffd700;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

.btn-cancel {
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 統計カード */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.stat-card h3 {
  color: #ffd700;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #fff;
}

/* クイックアクション */
.quick-actions {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  padding: 2rem;
}

.quick-actions h2 {
  color: #ffd700;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .action-buttons .btn-add {
    width: 100%;
  }
}

