/* 基本リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* body要素の統一スタイル */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* ヘッダー */
header {
    background: linear-gradient(to right, #43a047, #66bb6a);
    color: white;
    text-align: center;
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* ナビゲーション */
nav {
    background: linear-gradient(to right, #66bb6a, #81c784);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

nav ul li a:hover {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* ツールカード */
.tool-card {
    background: linear-gradient(135deg, #ffffff, #e8f5e9);
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.tool-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #2e7d32;
    border-bottom: 2px solid #4caf50;
    padding-bottom: 0.5rem;
}

/* ボタン */
button {
    background: linear-gradient(to right, #4caf50, #45a049);
    color: white;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    margin-bottom: 1rem;
    margin-right: 0.5rem;
}

button:hover {
    background: linear-gradient(to right, #45a049, #4caf50);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

/* フォーム要素 */
input[type="text"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #81c784;
    border-radius: 25px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* フッター */
footer {
    background: linear-gradient(to right, #43a047, #66bb6a);
    color: white;
    text-align: center;
    padding: 1rem 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    margin-top: auto;
}

/* qr-code specific styles */
.qrcode-area {
    margin: 2rem 0;
    text-align: center;
}

.description, .instructions {
    text-align: left;
    margin-bottom: 1.5rem;
}

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

.input-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #388e3c;
}

.color-options {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.color-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 0;
    margin: 0;
    /* 一般的なボタンスタイルを無効化してインラインスタイルを優先 */
    background: transparent;
    background-image: none;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
}

/* 各色の個別スタイル（クラスベースアプローチ） */
.color-options .color-btn.black { background-color: #000000; }
.color-options .color-btn.green { background-color: #2e7d32; }
.color-options .color-btn.blue { background-color: #1976d2; }
.color-options .color-btn.red { background-color: #e53935; }
.color-options .color-btn.orange { background-color: #ff9800; }
.color-options .color-btn.purple { background-color: #9c27b0; }

.color-btn.active {
    border-color: #4caf50;
    transform: scale(1.2);
}

.button-group {
    margin-top: 1rem;
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    main {
        padding: 1rem;
    }
    
    .tool-card {
        padding: 1.5rem;
    }
    
    #qrcodeCanvas {
        max-width: 100%;
        height: auto;
    }
    
    .color-options {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}
