/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ヘッダー */
header {
    background-color: #1e3a8a;
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* メインコンテンツ */
main {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* セクション */
.config-section {
    margin-bottom: 40px;
    padding: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
}

.config-section h2 {
    color: #1e3a8a;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #1e3a8a;
    padding-bottom: 10px;
}

/* フォームグループ */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.1);
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* フォーム行 */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
    padding: 15px;
    background-color: white;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

/* エントリー */
.vlan-entry,
.interface-entry,
.dhcp-entry {
    position: relative;
    margin-bottom: 10px;
}

/* ボタン */
button {
    cursor: pointer;
    font-size: 16px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #1e3a8a;
    color: white;
}

.btn-primary:hover {
    background-color: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-add {
    background-color: #10b981;
    color: white;
    margin-top: 10px;
}

.btn-add:hover {
    background-color: #059669;
}

.btn-remove {
    background-color: #ef4444;
    color: white;
    padding: 8px 15px;
    font-size: 14px;
}

.btn-remove:hover {
    background-color: #dc2626;
}

/* フォームアクション */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.form-actions button {
    padding: 15px 40px;
    font-size: 18px;
}

/* 設定出力 */
.config-output {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 説明セクション */
.explanation,
.tips {
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.explanation h2,
.tips h2 {
    color: #0369a1;
    margin-bottom: 15px;
}

.explanation ul,
.tips ol {
    padding-left: 30px;
}

.explanation li,
.tips li {
    margin-bottom: 8px;
}

/* フッター */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #6b7280;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    main {
        padding: 20px;
    }
    
    .config-section {
        padding: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

/* アニメーション */
.vlan-entry,
.interface-entry,
.dhcp-entry {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 無効化されたフィールド */
input:disabled,
select:disabled {
    background-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.6;
}

/* エラーメッセージ用（将来の拡張用） */
.error {
    color: #dc2626;
    font-size: 14px;
    margin-top: 5px;
}

.success {
    color: #059669;
    font-size: 14px;
    margin-top: 5px;
}
