/* src/components/CardDisplayItem.module.css */
*{
  font-family: "Noto Sans JP";
}

body {
  background-color: rgb(47, 47, 47);
  margin: 20px;
  color: white;
}

h1, h2, h3, h4, h5, h6 {
  color: #ccc;
}

.container {
  background-color: #333;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

input[type="text"] {
  padding: 10px;
  margin-right: 10px;
  border: 1px solid #555;
  border-radius: 4px;
  background-color: #222;
  color: white;
}

button {
  padding: 10px 15px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

#deckInfo {
  margin-top: 20px;
}

.card {
  border: 1px solid #444;
  padding: 10px;
  margin-bottom: 5px;
  border-radius: 4px;
  background-color: #2a2a2a;
}

.cardWrapper {
    position: relative; /* ウォーターマークの絶対配置の基準 */
    display: inline-block; /* Flexbox/Gridの子要素として適切に配置されるように */
    margin: 5px; /* カード間の余白 */
    /* box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); */ /* 必要であれば影を追加 */
    background-color: #282c34; /* カード画像の読み込み中の背景など */
    overflow: hidden; /* 画像がはみ出ないように */
    border-radius: 10px; /* カードの角を丸める (任意) */
}

.cardWrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* アスペクト比を保ちつつ、コンテナに収まるように */
}

.watermark {
    position: absolute;
    width: 30%; /* 親要素に対する割合で指定 (調整可能) */
    max-width: 80px; /* 最大幅 (調整可能) */
    height: auto;
    right: 5px;
    bottom: 5px;
    pointer-events: none; /* 下のカードをクリックできるように */
    opacity: 0.9; /* 少し透明にする (任意) */
}

/* src/components/DeckDisplayPage.module.css */
.errorMessage {
    color: #e74c3c; /* Red for errors */
    background-color: #fadbd8;
    border: 1px solid #f5b7b1;
    padding: 15px;
    margin-top: 10px;
    border-radius: 5px;
}

.errorMessage a {
    color: #c0392b;
    font-weight: bold;
}

.resultContainer {
    margin-top: 20px;
    padding: 15px;
    background-color: #343a40; /* Dark background */
    border-radius: 8px;
    color: #f8f9fa; /* Light text */
}

.deckHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #495057;
}

.deckHeader h2 {
    margin: 0;
    font-size: 1.8em;
    color: #17a2b8; /* Accent color */
}

.deckHeader p {
    margin: 0 0 0 15px;
    font-size: 0.9em;
    color: #adb5bd;
}

.heroImage {
    width: 80px; /* Adjust size as needed */
    height: auto;
    border-radius: 50%;
    border: 2px solid #17a2b8;
    margin-left: 15px;
}

.screenshotButton {
    padding: 8px 15px;
    background-color: #17a2b8; /* Accent color */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.screenshotButton:hover {
    background-color: #138496;
}

.deckDisplayArea {
    display: grid;
    /* grid-template-columns will be set by JS */
    /* grid-auto-rows will be set by JS or implicitly by content */
    gap: 10px; /* Spacing between cards */
    padding: 10px; /* Add some padding around the grid */
    height: 80vh; /* Viewport height percentage */
    overflow-y: auto; /* Scroll if content overflows */
    background-color: #2a2f36; /* Optional: background for the area */
    border-radius: 4px; /* Optional: rounded corners */
}

.cardWrapper {
    position: relative;
    /* display: inline-block; Remove this, grid handles layout */
    margin: 0; /* Grid gap handles spacing, remove individual margins */
    background-color: #282c34;
    overflow: hidden;
    border-radius: 10px;
    width: 100%; /* Make card wrapper fill the grid cell */
    height: 100%; /* Make card wrapper fill the grid cell */
    display: flex; /* For centering image inside */
    align-items: center;
    justify-content: center;
}

.cardWrapper img.cardImage { /* Add a class to the main card image for specific styling */
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px; /* If card images themselves should have rounded corners */
}

.watermark {
    position: absolute;
    width: 30%;
    max-width: 60px; /* Adjusted for potentially smaller cards */
    height: auto;
    right: 3px; /* Adjusted for potentially smaller cards */
    bottom: 3px; /* Adjusted for potentially smaller cards */
    pointer-events: none;
    opacity: 0.9;
}


/* src/components/DeckDisplayPage.module.css */
.errorMessage {
    color: #e74c3c; /* Red for errors */
    background-color: #fadbd8;
    border: 1px solid #f5b7b1;
    padding: 15px;
    margin-top: 10px;
    border-radius: 5px;
}

.infoMessage {
    margin-top: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    color: #495057;
    border-radius: 5px;
}

.infoMessage a {
    color: #007bff;
}

#loading-message { /* Assuming this ID is still used for global loading */
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    border-radius: 5px;
}
