/* ==========================================================================
   CSS 変数定義（テーマカラー）
   ========================================================================== */
:root {
    /* メインカラー：SNSアイコンベースの水色系 */
    --color-bg-light: #e0f2fe; /* 薄い水色（背景） */
    --color-bg-dark: #bae6fd; /* 少し濃い水色（グラデーション用） */
    --color-primary: #38bdf8; /* アクセントカラー */
    
    /* UIパーツのカラー */
    --color-window-bg: #ffffff; /* ウィンドウの背景色 */
    --color-border: #1e293b; /* 枠線（濃いネイビー） */
    --color-text: #334155; /* テキストカラー */
    --color-text-link: #0284c7;
    
    /* フォント設定 */
    --font-heading: 'DotGothic16', sans-serif;
    --font-body: 'M PLUS Rounded 1c', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: linear-gradient(180deg, var(--color-bg-light) 0%, var(--color-bg-dark) 100%);
    background-attachment: fixed; /* 背景を固定 */
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

a {
    color: var(--color-text-link);
    text-decoration: none;
}

/* 水中風の泡アニメーション背景 */
.water-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -50px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: rise infinite ease-in;
}

.bubble:nth-child(1) { width: 40px; height: 40px; left: 10%; animation-duration: 8s; }
.bubble:nth-child(2) { width: 20px; height: 20px; left: 30%; animation-duration: 5s; animation-delay: 1s;}
.bubble:nth-child(3) { width: 50px; height: 50px; left: 60%; animation-duration: 10s; animation-delay: 2s;}
.bubble:nth-child(4) { width: 30px; height: 30px; left: 80%; animation-duration: 6s; animation-delay: 0.5s;}
.bubble:nth-child(5) { width: 15px; height: 15px; left: 90%; animation-duration: 4s; animation-delay: 3s;}

@keyframes rise {
    0% { bottom: -50px; transform: translateX(0); }
    50% { transform: translateX(20px); }
    100% { bottom: 100vh; transform: translateX(-20px); }
}

/* ==========================================================================
   ゲーム風 UI コンポーネント (DOTOWN風)
   ========================================================================== */
/* レトロRPGのウィンドウ風ボックス */
.game-window {
    background-color: var(--color-window-bg);
    border: 4px solid var(--color-border);
    border-radius: 8px; /* 少し丸みを持たせてポップに */
    box-shadow: 4px 4px 0px var(--color-primary); /* レトロなドロップシャドウ */
    padding: 20px;
    margin-bottom: 20px;
}

/* ボタンの共通スタイル */
.btn {
    display: inline-block;
    background-color: var(--color-window-bg);
    border: 3px solid var(--color-border);
    border-radius: 6px;
    padding: 8px 16px;
    font-family: var(--font-heading);
    color: var(--color-border);
    text-align: center;
    cursor: pointer;
    box-shadow: 2px 2px 0px var(--color-border);
    transition: all 0.1s;
}

.btn:hover {
    background-color: #f1f5f9;
}

.btn:active {
    box-shadow: 0px 0px 0px var(--color-border);
    transform: translate(2px, 2px); /* 押し込むアニメーション */
}

/* ==========================================================================
   レイアウト
   ========================================================================== */
header {
    margin: 20px auto;
    width: 90%;
    max-width: 1000px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-border);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 10px;
}

main {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 50px;
}

/* ==========================================================================
   セクションごとのスタイル
   ========================================================================== */
.section {
    margin-top: 60px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-border);
    margin-bottom: 20px;
    text-shadow: 1px 1px 0px #fff;
}

/* ヒーローセクション（メインビジュアル） */
#hero {
    margin-top: 40px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.character-image-placeholder img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 50%;
    border: 4px solid var(--color-border);
    box-shadow: 0 0 0 6px white, 0 0 20px rgba(56, 189, 248, 0.5); /* アイコン風の装飾 */
    background-color: white;
}

.hero-text {
    width: 100%;
    max-width: 600px;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    line-height: 1.6;
    text-align: center;
}

/* Service (事業内容) */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.service-card {
    text-align: center;
}

.service-card .icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.service-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* Profile & Blog (プロフィールとブログ) */
.profile-container {
    font-size: 1.05rem;
}

.subsection-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-border);
    margin: 40px 0 20px;
    text-shadow: 1px 1px 0px #fff;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.blog-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.blog-thumbnail {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    border-bottom: 3px solid var(--color-border);
}

.blog-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card .date {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 5px;
}

.blog-card h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.blog-card .read-more {
    display: inline-block;
    margin-top: auto;
    font-weight: bold;
    color: var(--color-primary);
    text-decoration: none;
}

.blog-card .read-more:hover {
    text-decoration: underline;
}

/* Contact (お問い合わせ) */
.contact-container {
    text-align: center;
}

.contact-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.contact-btn {
    font-size: 1.1rem;
    padding: 12px 24px;
}

/* Footer */
footer {
    width: 90%;
    max-width: 1000px;
    margin: 40px auto;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

/* ==========================================================================
   アニメーション・動き
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* スマホ用調整 */
@media (max-width: 600px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }
    .logo {
        font-size: 1.5rem;
    }
    .hero-text {
        font-size: 1rem;
    }
}

/* ==========================================================================
   モーダル (ポップアップ)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.2s;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background-color: var(--color-border);
    color: white;
    border: 3px solid white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 2px 0px var(--color-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.1s;
    z-index: 10;
}

.modal-close-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px var(--color-primary);
}

.modal-title {
    font-family: var(--font-heading);
    color: var(--color-border);
    margin-bottom: 10px;
    font-size: 1.3rem;
    text-shadow: none;
}

.modal-desc {
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-family: var(--font-heading);
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 3px solid var(--color-border);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.3);
}

.submit-btn {
    width: 100%;
    margin-top: 10px;
    background-color: var(--color-bg-light);
    font-size: 1.1rem;
}
