/* ========================================
   整備士タイプ診断 - 共通スタイルシート
   ======================================== */

/* ========================================
   リセット・基本設定
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Arial, 'Yu Gothic', 'Meiryo', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* ========================================
   コンテナ
   ======================================== */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 60px 40px;
    animation: fadeIn 0.6s ease-out;
}

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

/* ========================================
   ヘッダー
   ======================================== */
.header {
    text-align: center;
    margin-bottom: 50px;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.main-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
    margin-bottom: 10px;
}

.type-names {
    font-size: 1rem;
    color: #764ba2;
    font-weight: 600;
    letter-spacing: 2px;
}

/* ========================================
   見出し
   ======================================== */
h1 {
    font-size: 2rem;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem;
    color: #444;
    margin-bottom: 20px;
    font-weight: 600;
}

/* ========================================
   説明文
   ======================================== */
.description {
    text-align: center;
    margin-bottom: 40px;
}

.time-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
}

.clock-icon {
    font-size: 1.2rem;
}

.desc-text {
    font-size: 1.05rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.desc-text:last-child {
    margin-bottom: 0;
}

/* ========================================
   タイプグリッド
   ======================================== */
.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.type-card {
    text-align: center;
    padding: 25px 15px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.type-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
}

.type-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.type-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.type-desc {
    font-size: 0.9rem;
    color: #777;
}

/* ========================================
   キャラクター画像スタイル
   ======================================== */
.character-icons {
    margin: 0 0 40px 0;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 25px;
    justify-items: center;
    margin-bottom: 30px;
}

.character-icon {
    text-align: center;
    transition: all 0.3s ease;
}

.character-icon:hover {
    transform: translateY(-8px);
}

.character-icon img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    background: white;
}

.character-icon:hover img {
    border-color: #764ba2;
    box-shadow: 0 12px 30px rgba(118, 75, 162, 0.4);
    transform: scale(1.05);
}

.icon-label {
    margin-top: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.5px;
}

.icon-description {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.character-icon:hover .icon-description {
    opacity: 1;
    transform: translateY(0);
    max-height: 50px;
}

/* ========================================
   ボタン
   ======================================== */
.btn,
.start-button {
    display: inline-block;
    padding: 18px 50px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    text-align: center;
}

.btn:hover,
.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.5);
}

.btn:active,
.start-button:active {
    transform: translateY(-1px);
}

.btn-container,
.cta-section {
    text-align: center;
    margin: 30px 0;
}

/* ========================================
   注意事項・補足
   ======================================== */
.notice {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px;
    border-radius: 8px;
    margin-top: 40px;
    font-size: 0.95rem;
    color: #666;
}

.notice-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
}

/* ========================================
   レスポンシブ対応
   ======================================== */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .container {
        padding: 40px 25px;
        border-radius: 15px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .type-names {
        font-size: 0.9rem;
    }
    
    .icon-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 20px;
    }
    
    .character-icon img {
        width: 100px;
        height: 100px;
    }
    
    .icon-label {
        font-size: 0.9rem;
    }
    
    .icon-description {
        font-size: 0.8rem;
    }
    
    .description {
        font-size: 1rem;
    }
    
    .desc-text {
        font-size: 1rem;
    }
    
    .types-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .type-card {
        padding: 20px 10px;
    }
    
    .type-icon {
        font-size: 2.5rem;
    }
    
    .type-name {
        font-size: 1rem;
    }
    
    .type-desc {
        font-size: 0.85rem;
    }
    
    .btn,
    .start-button {
        padding: 15px 40px;
        font-size: 1rem;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 30px 20px;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    h1 {
        font-size: 1.4rem;
    }
    
    .types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .type-icon {
        font-size: 2.2rem;
    }
}

/* ========================================
   アニメーション・演出
   ======================================== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.btn-pulse {
    animation: pulse 2s infinite;
}

/* ========================================
   アクセシビリティ
   ======================================== */
.btn:focus,
.type-card:focus {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

/* ========================================
   フッター
   ======================================== */
.footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.footer p {
    font-size: 0.9rem;
    color: #999;
}

/* ========================================
   印刷用スタイル
   ======================================== */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
    }
    
    .btn,
    .start-button {
        display: none;
    }
}
