* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
    line-height: 1.6;
    color: #4a4a4a;
    background-color: #f9f7f4;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.header-logo {
    max-width: 550px;
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #ff8c00;
    font-weight: 600;
    font-size: 28px;
}

.disclaimer {
    background-color: #fff8e1;
    border-left: 4px solid #ffb300;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #5f4b32;
}

.disclaimer strong {
    color: #d84315;
}

.calculator {
    background-color: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #666;
    font-size: 15px;
}

input, select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    font-size: 16px;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

/* Add stronger visual distinction for disabled/readonly inputs */
input:disabled, select:disabled, input[readonly] {
    background-color: #f0f0f0;
    color: #999;
    border: 1px dashed #ccc;
    cursor: not-allowed;
    opacity: 0.8;
}

input:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.3);
    border-color: #ff8c00;
}

/* Enhance interactive input styling */
input:not(:disabled):not([readonly]), select:not(:disabled) {
    border-color: #d0d0d0;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

button {
    background-color: #ff8c00;
    color: white;
    border: none;
    padding: 14px 20px;
    width: 100%;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 140, 0, 0.2);
}

button:hover {
    background-color: #ff9f33;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 140, 0, 0.25);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(255, 140, 0, 0.2);
}

.results {
    background-color: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: none;
    border: 1px solid #f0f0f0;
    animation: fadeIn 0.5s ease;
}

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

.results.active {
    display: block;
}

h2, h3 {
    margin-bottom: 20px;
    color: #ff8c00;
    font-weight: 600;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.payment-schedule {
    margin-top: 35px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 12px 15px;
    text-align: left;
}

th {
    background-color: #fff5e6;
    font-weight: 600;
    color: #ff8c00;
    border-bottom: 2px solid #ffb347;
}

td {
    border-bottom: 1px solid #f0f0f0;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #fffaf0;
}

.bonus-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.bonus-month-select {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bonus-month-select label {
    margin-bottom: 0;
    min-width: 60px;
}

.bonus-month-select select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    width: 100px;
}

/* ラジオボタン用のスタイル */
.bonus-radio-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.bonus-radio-group {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
}

.bonus-season-label {
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}

.radio-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
}

.radio-container {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    white-space: nowrap;
    flex-direction: row;
    text-align: center;
}

.radio-container input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.bonus-period-notice {
    font-size: 13px;
    color: #d84315;
    margin-bottom: 10px;
    font-style: italic;
}

/* ボーナスニ括払いのスタイル */
.bonus-two-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    background-color: #f8f9fa;
}

/* 打消線スタイル */
.disabled-option {
    text-decoration: line-through;
    color: #999;
}

/* ゼロ金利警告メッセージ */
.zero-interest-warning {
    background-color: #FFF3CD;
    border-left: 4px solid #FFDA6A;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #856404;
}

.zero-interest-warning strong {
    color: #856404;
    font-weight: bold;
}

/* PH30警告メッセージ */
.ph30-warning {
    background-color: #FFE8E6;
    border-left: 4px solid #FF6B6B;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #D32F2F;
    font-weight: bold;
}

/* 入力フィールドとヒントのコンテナ */
.input-with-hint {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* 入力ヒントテキスト */
.input-hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* 金額入力コントロールのコンテナ */
.amount-control-container {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

/* 金額入力フィールド */
.amount-input {
    flex: 1;
    text-align: center;
    font-size: 16px;
    padding: 10px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background-color: #fafafa;
}

/* 金額コントロールボタン */
.amount-control-button {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 増加ボタン（加算ボタン）のスタイル */
.amount-control-button.increase {
    background-color: #e6eef7; /* 紺色ベース（薄い色） */
    border: 1px solid #c0d0e0;
    color: #2c4b75;
}

.amount-control-button.increase-10k {
    background-color: #d1e0f0; /* 紺色ベース（濃い色） */
    border: 1px solid #a0b8d0;
    color: #1a3a64;
    width: 50px;
    font-size: 14px;
}

/* 減少ボタン（減算ボタン）のスタイル */
.amount-control-button.decrease {
    background-color: #ffeee0; /* オレンジ色ベース（薄い色） */
    border: 1px solid #f0d0b8;
    color: #9c5518;
}

.amount-control-button.decrease-10k {
    background-color: #ffdfc0; /* オレンジ色ベース（濃い色） */
    border: 1px solid #e0c0a0;
    color: #884200;
    width: 50px;
    font-size: 14px;
}

/* ホバー状態 */
.amount-control-button.increase:hover {
    background-color: #d1e0f0;
    transform: translateY(-1px);
}

.amount-control-button.increase-10k:hover {
    background-color: #bfd1e6;
}

.amount-control-button.decrease:hover {
    background-color: #ffdfc0;
    transform: translateY(-1px);
}

.amount-control-button.decrease-10k:hover {
    background-color: #ffd0a6;
}

/* アクティブ状態 */
.amount-control-button.increase:active {
    background-color: #c0d0e0;
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.amount-control-button.increase-10k:active {
    background-color: #a7bfdb;
}

.amount-control-button.decrease:active {
    background-color: #f0d0b8;
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.amount-control-button.decrease-10k:active {
    background-color: #ebc09e;
}

/* カード情報表示用のスタイル */
.card-info {
    background-color: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
    animation: fadeIn 0.5s ease;
}

.card-info h3 {
    color: #1a5a9b; /* EDION blue color */
    margin-bottom: 15px;
    font-size: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.card-info-item {
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 14px;
}

.card-info-item strong {
    color: #555;
    font-weight: 600;
}

.card-info-display {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid #1a5a9b; /* EDION blue color */
}

@media (max-width: 600px) {
    .container {
        padding: 20px 15px;
    }
    
    .calculator, .results {
        padding: 20px;
    }
    
    input, select, button {
        padding: 10px;
    }
    
    .header-logo {
        max-width: 90%;
    }
    
    h1 {
        font-size: 22px;
    }
    
    /* モバイル表示時の金額コントロールボタンのスタイル調整 */
    .amount-control-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 3px;
    }
    
    .amount-control-button {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .amount-control-button.increase-10k,
    .amount-control-button.decrease-10k {
        width: 45px;
        font-size: 12px;
    }
    
    .amount-input {
        width: 100%;
        margin: 5px 0;
        order: -1;
    }
}

/* Print button styles */
.print-controls {
    margin: 20px 0;
    text-align: right;
}

.print-button {
    background-color: #1a5a9b;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.print-button:hover {
    background-color: #134780;
}

.print-instructions {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}
