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

:root {
    --primary-color: #1E88E5;
    --secondary-color: #42A5F5;
    --accent-color: #FFD700;
    --bg-color: #F0F8FF;
    --text-color: #333333;
    --white: #FFFFFF;
    --hydrogen-blue: #00BFFF;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--hydrogen-blue) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Background decoration with hydrogen atoms */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 35%),
        radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.12) 0%, transparent 45%);
    pointer-events: none;
}

.container {
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 40px 32px;
    max-width: 480px;
    width: 100%;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
    min-height: auto;
}

/* Decorative corner with hydrogen symbol */
.container::before {
    content: 'H₂';
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--hydrogen-blue));
    border-radius: 24px 0 0 0;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    font-weight: 700;
    padding-left: 15px;
    padding-top: 15px;
}

.container::after {
    content: '💧';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 0 0 24px 0;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    padding-right: 10px;
    padding-bottom: 10px;
}

.header-section {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    z-index: 2;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    margin: 0 auto 16px;
    transition: transform 0.3s ease;
    display: block;
}

.profile-image:hover {
    transform: rotate(2deg) scale(1.05);
}

.site-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.site-title .highlight {
    color: var(--primary-color);
}

.site-subtitle {
    font-size: 14px;
    color: var(--hydrogen-blue);
    font-weight: 400;
    line-height: 1.4;
}

.main-message {
    margin-bottom: 24px;
}

.featured-message {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--hydrogen-blue) 100%);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: var(--white);
    margin-bottom: 8px;
}

.featured-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
    opacity: 0.8;
}

.featured-message-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.featured-message-subtitle {
    font-size: 13px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    line-height: 1.4;
}

.book-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.section-title {
    margin: 32px 0 16px 0;
    text-align: left;
    padding: 0 4px;
}

.section-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    display: inline-block;
}

.section-title:first-of-type {
    margin-top: 16px;
}

.book-link {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background: var(--white);
    border: 2px solid #e8f4fd;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.book-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 136, 229, 0.08), transparent);
    transition: left 0.6s ease;
}

.book-link:hover::before {
    left: 100%;
}

.book-link:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.book-icon {
    width: 28px;
    height: 28px;
    margin-right: 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--hydrogen-blue));
    color: white;
    flex-shrink: 0;
}

.book-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.book-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-color);
}

.book-subtitle {
    font-size: 12px;
    color: var(--hydrogen-blue);
    opacity: 0.8;
}

.amazon-badge {
    margin-left: auto;
    background: #FF9500;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
}

/* ---- おすすめカード ---- */
.book-link.is-recommend {
    border-color: #ffcc80;
    background: linear-gradient(135deg, #fffde7 0%, #fff8e1 50%, #ffffff 100%);
    margin-top: 18px;
    overflow: visible;
}

.book-link.is-recommend:hover {
    border-color: #ff9800;
    box-shadow: 0 8px 30px rgba(255, 152, 0, 0.18);
    background: linear-gradient(135deg, #fffde7 0%, #fff3e0 100%);
}

.recommend-tag {
    position: absolute;
    top: -14px;
    right: 14px;
    background: #e53935;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(229, 57, 53, 0.4);
    z-index: 10;
    animation: tagShake 3s ease-in-out infinite;
}

@keyframes tagShake {
    0%, 72%, 100% { transform: rotate(0); }
    74% { transform: rotate(-4deg) scale(1.05); }
    77% { transform: rotate(4deg) scale(1.05); }
    80% { transform: rotate(-3deg); }
    83% { transform: rotate(3deg); }
    86% { transform: rotate(-1deg); }
    89% { transform: rotate(0); }
}

.book-link.is-recommend::before {
    clip-path: inset(0 0 0 0 round 14px);
}

.book-link.is-recommend::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
    clip-path: inset(0 0 0 0 round 14px);
}

@keyframes shimmer {
    0%, 100% { left: -100%; }
    50% { left: 150%; }
}

.contact-section {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.contact-text {
    font-size: 13px;
    color: var(--text-color);
    margin-bottom: 12px;
    opacity: 0.7;
}

.contact-button {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    text-align: center;
    padding: 12px 24px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.5s ease;
    transform: translate(-50%, -50%);
}

.contact-button:hover::before {
    width: 200px;
    height: 200px;
}

.contact-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.contact-button span {
    position: relative;
    z-index: 1;
}

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

.book-link:nth-child(1) { animation-delay: 0.1s; }
.book-link:nth-child(2) { animation-delay: 0.2s; }
.book-link:nth-child(3) { animation-delay: 0.3s; }
.book-link:nth-child(4) { animation-delay: 0.4s; }
.book-link:nth-child(5) { animation-delay: 0.5s; }
.book-link:nth-child(6) { animation-delay: 0.6s; }

.book-link {
    animation: fadeInUp 0.6s ease-out backwards;
}

/* Responsive Design */
@media (max-width: 767px) {
    .container {
        padding: 32px 24px;
        margin: 10px;
        border-radius: 20px;
        max-width: 380px;
    }

    .profile-image {
        width: 100px;
        height: 100px;
    }

    .site-title {
        font-size: 22px;
    }

    .site-subtitle {
        font-size: 13px;
    }

    .featured-message-title {
        font-size: 18px;
    }

    .book-link {
        padding: 16px 16px;
    }

    .book-icon {
        width: 24px;
        height: 24px;
        margin-right: 12px;
        font-size: 14px;
    }

    .book-title {
        font-size: 14px;
    }

    .book-subtitle {
        font-size: 11px;
    }

    .contact-button {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Accessibility */
.book-link:focus,
.contact-button:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Ripple effect animation */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.keyboard-navigation *:focus {
    outline: 3px solid var(--accent-color) !important;
    outline-offset: 2px !important;
}