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

body {
    font-family: 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* メインコンテナ */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* カードデザイン */
.card {
    background: white;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

/* タイトル */
h1 {
    text-align: center;
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 40px;
    font-weight: 700;
    letter-spacing: 1px;
}

h2 {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 20px;
    font-weight: 600;
}

/* 入力セクション */
.input-section {
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #f0f3f7 100%);
    border-radius: 16px;
    transition: background 0.3s ease;
}

.input-section:hover {
    background: linear-gradient(135deg, #f0f3f7 0%, #e8ecf1 100%);
}

/* 生年月日入力エリア */
.date-inputs {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 120px;
}

label {
    font-size: 0.95em;
    color: #555;
    font-weight: 600;
}

/* セレクトボックス */
.select-input {
    padding: 14px 16px;
    font-size: 1.1em;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.select-input:hover {
    border-color: #667eea;
    background: #fafbfc;
}

.select-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* 年齢入力エリア */
.age-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.age-input {
    padding: 16px 24px;
    font-size: 1.5em;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    width: 150px;
    text-align: center;
    transition: all 0.3s ease;
    outline: none;
    font-weight: 600;
}

.age-input:hover {
    border-color: #667eea;
    background: #fafbfc;
}

.age-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* 数値入力のスピンボタンを非表示 */
.age-input::-webkit-inner-spin-button,
.age-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.age-input {
    -moz-appearance: textfield;
}

.age-label {
    font-size: 1.5em;
    color: #333;
    font-weight: 600;
}

/* エラーメッセージ */
.error-message {
    display: none;
    color: #ff4757;
    font-size: 0.95em;
    margin-top: 12px;
    text-align: center;
    font-weight: 600;
    padding: 10px;
    background: rgba(255, 71, 87, 0.1);
    border-radius: 8px;
}

/* 結果表示セクション */
.result-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.result-text {
    font-size: 3em;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease;
}

/* 結果のアニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 結果の色分け */
.result-text.passed {
    color: #fff;
}

.result-text.upcoming {
    color: #ffe066;
}

/* 広告スペース */
.ad-space {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 60px 30px;
    text-align: center;
    color: white;
    font-size: 1.1em;
    backdrop-filter: blur(10px);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    height: 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .card {
        padding: 30px 20px;
    }

    h1 {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    h2 {
        font-size: 1.1em;
    }

    .date-inputs {
        flex-direction: column;
        gap: 15px;
    }

    .input-group {
        min-width: 100%;
    }

    .result-text {
        font-size: 2em;
    }

    .age-input {
        width: 120px;
        font-size: 1.3em;
    }

    .age-label {
        font-size: 1.3em;
    }

    .input-section {
        padding: 20px;
    }

    .result-section {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .card {
        padding: 20px 15px;
    }

    h1 {
        font-size: 1.5em;
    }

    .result-text {
        font-size: 1.5em;
        letter-spacing: 1px;
    }

    .age-input {
        width: 100px;
        font-size: 1.2em;
        padding: 12px 16px;
    }
}