/* 基本リセット */
* {
    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);
}

/* フォーム要素 */
textarea, input[type="text"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #81c784;
    border-radius: 4px;
    background-color: #fff;
    color: #2c3e50;
    font-family: 'Fira Code', 'Courier New', monospace;
}

textarea {
    height: 200px;
    resize: vertical;
}

/* フッター */
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;
}

/* env-manager specific styles */
.tool-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.input-section, .output-section, .validation-section, .templates-section {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
}

.input-mode {
    margin-bottom: 1rem;
}

.input-mode label {
    margin-right: 1rem;
    cursor: pointer;
}

.env-form {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #c8e6c9;
    padding: 1rem;
    border-radius: 4px;
}

.env-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.env-key {
    flex: 1;
}

.env-value {
    flex: 2;
}

.remove-btn {
    background: #ef5350;
}

.add-btn {
    background: #66bb6a;
}

.clear-btn {
    background: #78909c;
}

.form-controls {
    margin-bottom: 1rem;
}

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

.output-tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 2px solid #4caf50;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px 4px 0 0;
    margin: 0;
}

.tab-btn.active {
    background-color: #4caf50;
    color: white;
}

.status-bar {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    font-weight: bold;
    display: none;
}

.status-bar.success {
    background-color: #e8f5e9;
    color: #388e3c;
    border: 1px solid #a5d6a7;
    display: block;
}

.status-bar.error {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ef9a9a;
    display: block;
}

.validation-results {
    min-height: 100px;
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 4px;
}

.validation-item {
    margin-bottom: 0.5rem;
}

.validation-item.valid {
    color: #388e3c;
}

.validation-item.invalid {
    color: #d32f2f;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.template-card {
    border: 1px solid #c8e6c9;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.template-card h3 {
    color: #43a047;
}

@media (max-width: 900px) {
    .tool-container {
        grid-template-columns: 1fr;
    }
}
