/* 左側パネル全体の文字色を白にする */
.maker-container {
    display: flex;
    gap: 40px;
    max-width: 800px;
    margin: 50px auto;
    background: #34495e;
    padding: 30px;
    border-radius: 15px;
    color: #ffffff; /* ここでコンテナ内の文字を白に統一 */
}

/* === カード本体の基本スタイル === */
.card {
    position: relative;
    width: 280px;
    height: 392px;
    background-color: #fff; /* デフォルト背景 */
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    color: #333;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* SR/SSRの光沢がはみ出さないように */
    box-sizing: border-box; /* サイズ計算を正確にする */
}

/* === コストや名前の配置 === */
.card-cost {
    display: none; /* 非表示にする */
}

.card-name {
    margin-top: 0px;        /* 上の余白をなくす */
    font-weight: bold;
    font-size: 1.1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.card-desc {
    margin-top: 15px;       /* 名前との間隔を少し広げる */
    font-size: 0.85rem;
    line-height: 1.4;
    flex-grow: 1;           /* これにより下のラインまで領域が広がります */
    white-space: pre-wrap;
    padding-bottom: 30px;   /* 下のラインとの間に余裕を持たせる */
}

.card-type {
    position: absolute;
    bottom: 0;             /* 一番下に配置 */
    left: 0;
    right: 0;              /* 左右いっぱいに広げる */
    height: 40px;          /* 高さ固定 */
    display: flex;
    align-items: center;
    justify-content: center;
    
    border-top: 1px solid rgba(255, 255, 255, 0.3); /* タイプ上のラインを追加 */
    background: rgba(0, 0, 0, 0.05);               /* 少しだけ背景色をつけて区切りを強調 */
    
    font-size: 1.2rem;
    font-weight: bold;
    color: inherit;
    opacity: 0.8;
}

/* === レアリティ別背景色 === */
.bg-normal { 
    position: relative;
    overflow: hidden;
    background-color: #f5f6fa; 
    font-weight: bold;
}
.bg-rare   { 
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #dff9fb, #c7ecee, #95afc0) !important;
    font-weight: bold;
}

/* SR (金) */
.shiny-gold {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fff5c3, #f5e082, #eeb840) !important;
    font-weight: bold;
}

.shiny-gold::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.4) 45%, rgba(255,255,255,0.4) 55%, transparent 80%);
    background-size: 200% 100%;
    animation: shine 3s infinite linear;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* SSR (虹) */
.shiny-rainbow {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3) !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
    font-weight: bold;
}

.shiny-rainbow::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.5) 45%, rgba(255,255,255,0.5) 55%, transparent 80%);
    background-size: 200% 100%;
    animation: shine 2.5s infinite linear;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.shiny-legend {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #9b59b6, #8e44ad, #e056fd) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
    font-weight: bold;
}

.shiny-legend::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.6) 45%, rgba(255,255,255,0.6) 55%, transparent 80%);
    background-size: 200% 100%;
    animation: shine 2s infinite linear;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* --- アニメーション定義 (共通) --- */
@keyframes shine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.maker-container {
    display: flex;
    gap: 40px;
    max-width: 800px;
    margin: 50px auto;
    background: #34495e;
    padding: 30px;
    border-radius: 15px;
}

.input-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-panel label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    gap: 5px;
}

.input-panel input[type="text"], 
.input-panel textarea {
    padding: 8px;
    border-radius: 4px;
    border: none;
}

.group {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.9rem;
}

.preview-panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    padding: 20px;
}

/* カードが浮かないように調整 */
.card {
    cursor: default;
    transform: none !important;
}