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

:root {
    --primary-color: #6b21a8; /* 紫色 - クリモバのメインカラー */
    --secondary-color: #3b82f6; /* 青色 - アクセントカラー */
    --dark-purple: #4c1d95; /* 濃い紫 */
    --light-purple: #a855f7; /* 薄い紫 */
    --text-color: #1e293b; /* テキストカラー */
    --light-bg: #f8fafc; /* 薄い背景色 */
    --card-bg: #ffffff; /* カード背景色 */
    --border-radius: 12px; /* 角丸 */
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background-color: var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    color: white;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.simulator {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.usage-input {
    flex: 1;
    min-width: 300px;
    padding: 25px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.results {
    flex: 2;
    min-width: 500px;
    padding: 25px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-purple);
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.2);
}

input[type="range"] {
    height: 10px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 10px 0;
    width: 100%;
    background: #e2e8f0;
    border-radius: 5px;
    outline: none;
    border: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.range-value {
    text-align: center;
    font-weight: bold;
    margin-top: 10px;
    color: var(--primary-color);
    font-size: 1.1rem;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    width: 100%;
    margin-top: 15px;
    transition: background-color 0.3s;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(107, 33, 168, 0.2);
}

button:hover {
    background-color: var(--dark-purple);
    transform: translateY(-2px);
}

.comparison {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.8rem;
}

h3 {
    margin: 25px 0 15px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: var(--primary-color);
}

tr:hover {
    background-color: #f8fafc;
}

.plan-card {
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: white;
}

.plan-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.plan-card h3 {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary-color);
}

.plan-card .price {
    font-size: 1.6em;
    color: var(--primary-color);
    font-weight: bold;
}

.plan-details {
    margin-top: 15px;
}

.plan-details p {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.plan-details p span:first-child {
    color: #64748b;
}

#token-results {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
}

#token-chart-container {
    height: 450px;
    margin: 25px 0;
    min-height: 350px;
}

#token-summary {
    background-color: #f8fafc;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 20px;
}

.token-value {
    font-weight: bold;
    color: #10b981;
}

.token-future-value {
    font-weight: bold;
    color: #059669;
}

.token-asset-value {
    font-weight: bold;
    color: var(--secondary-color);
}

.payment-value {
    font-weight: bold;
    color: #ef4444;
}

.token-highlight {
    background-color: #f0fdf4;
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 15px 0;
    border-left: 4px solid #10b981;
}

.token-highlight p {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

footer {
    text-align: center;
    padding: 30px 20px;
    font-size: 14px;
    color: #64748b;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 30px;
}

footer p {
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .simulator {
        flex-direction: column;
    }
    
    .usage-input, .results {
        width: 100%;
        min-width: 100%;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    #token-chart-container {
        height: 500px;
    }
}

/* 注意書きのスタイル */
.notes-container {
    margin-bottom: 30px;
}

.notes {
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.notes p {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #78350f;
}

.notes p:last-child {
    margin-bottom: 0;
}

/* 結果テーブルのスタイル */
.text-results {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.9em;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
}

.results-table thead tr {
    background-color: var(--primary-color);
    color: #ffffff;
    text-align: center;
}

.results-table th,
.results-table td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.results-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.results-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.results-table tbody tr:last-of-type {
    border-bottom: 2px solid var(--primary-color);
    font-weight: bold;
    background-color: #f0fdf4;
}

.text-results h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
    text-align: center;
}
