@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600;700&family=M+PLUS+Rounded+1c:wght@400;700&display=swap');

:root {
    --red: #d21414;
    --yellow: #f0c828;
    --red-light: rgba(210, 20, 20, 0.1);
    --yellow-light: rgba(240, 200, 40, 0.15);
}

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

body {
    font-family: 'M PLUS Rounded 1c', 'Quicksand', 'Segoe UI', sans-serif;
    background: 
        linear-gradient(180deg, #fff8f0 0%, #fff0f0 50%, #fff5f0 100%),
        radial-gradient(circle at 20% 80%, rgba(210, 20, 20, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(240, 200, 40, 0.03) 0%, transparent 50%);
    min-height: 100vh;
    color: #3d2a2a;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(210,20,20,0.02)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    pointer-events: none;
    z-index: 1;
}

/* パーティクル効果 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.particle {
    position: absolute;
    font-size: 20px;
    animation: float 12s linear infinite;
    opacity: 0;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg) scale(0); opacity: 0; }
    10% { opacity: 0.9; }
    50% { opacity: 0.6; }
    90% { opacity: 0.4; }
    100% { transform: translateY(-50px) rotate(180deg) scale(1); opacity: 0; }
}

/* トップライン */
.top-line {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--red), var(--yellow), var(--red));
    background-size: 200% 100%;
    animation: rainbow-flow 3s linear infinite;
    z-index: 100;
}

@keyframes rainbow-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* コーナーアクセント */
.corner-accents {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.corner-accent {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 3px solid var(--red);
}

.corner-accent.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.corner-accent.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.corner-accent.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.corner-accent.br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

/* コンテナ */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 50px 25px 50px;
    position: relative;
    z-index: 5;
}

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

/* バナー */
.banner {
    position: relative;
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--red) 0%, #a01010 50%, var(--red) 100%);
    border-radius: 25px;
    margin-bottom: -65px;
    overflow: hidden;
    box-shadow: 
        0 15px 40px rgba(210, 20, 20, 0.35),
        0 5px 15px rgba(210, 20, 20, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.banner::before {
    content: '★';
    position: absolute;
    font-size: 90px;
    color: rgba(255, 255, 255, 0.15);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.15; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.25; }
}

.banner-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 30% 70%, rgba(240, 200, 40, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
    animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* アバター */
.avatar-container {
    position: relative;
    width: 190px;
    height: 190px;
    margin: 0 auto;
    z-index: 10;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid #fff;
    object-fit: cover;
    box-shadow: 
        0 10px 35px rgba(210, 20, 20, 0.4),
        0 0 0 8px var(--red),
        0 0 0 12px rgba(255, 255, 255, 0.8),
        0 0 30px rgba(210, 20, 20, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: brightness(1.05) contrast(1.1);
}

.avatar:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 
        0 15px 45px rgba(210, 20, 20, 0.5),
        0 0 0 10px var(--yellow),
        0 0 0 14px rgba(255, 255, 255, 0.9),
        0 0 40px rgba(240, 200, 40, 0.3);
    filter: brightness(1.1) contrast(1.15) saturate(1.1);
}

/* 名前ボックス */
.name-box {
    margin-top: 20px;
}

.name {
    font-family: 'Quicksand', sans-serif;
    font-size: 2.8em;
    font-weight: 700;
    background: linear-gradient(135deg, var(--red) 0%, #8a1010 50%, var(--red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(210, 20, 20, 0.1);
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 5px rgba(210, 20, 20, 0.3)); }
    to { filter: drop-shadow(0 0 15px rgba(210, 20, 20, 0.5)); }
}

.name-jp {
    font-size: 1.2em;
    color: var(--red);
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 12px;
}

/* バッジ */
.badge-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.badge {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    background: linear-gradient(135deg, var(--red), #8a1010);
    color: white;
    padding: 8px 22px;
    border-radius: 25px;
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(210, 20, 20, 0.3);
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(210, 20, 20, 0.4);
}

/* カード */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 22px;
    position: relative;
    box-shadow: 
        0 8px 25px rgba(210, 20, 20, 0.1),
        0 0 0 1px rgba(210, 20, 20, 0.1),
        0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--red);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--red), var(--yellow), var(--red));
    border-radius: 20px 20px 0 0;
}

.card:hover {
    transform: translateX(5px) translateY(-2px);
    box-shadow: 
        0 12px 35px rgba(210, 20, 20, 0.15),
        0 5px 15px rgba(210, 20, 20, 0.1),
        0 2px 10px rgba(0, 0, 0, 0.1);
}

/* カードヘッダー */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px dashed var(--yellow);
}

.section-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.3em;
    font-weight: 700;
    color: var(--red);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '✦';
    color: var(--yellow);
}

.section-id {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 0.8em;
    color: white;
    background: var(--red);
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 700;
}

/* 情報グリッド */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
}

.info-item {
    background: linear-gradient(135deg, #fffaf5 0%, #fff5f5 100%);
    border-radius: 12px;
    padding: 18px 12px;
    text-align: center;
    border: 2px solid var(--yellow-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red), var(--yellow));
}

.info-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.info-item:hover {
    transform: translateY(-4px) scale(1.02);
    background: var(--red-light);
    border-color: var(--red);
    box-shadow: 0 8px 20px rgba(210, 20, 20, 0.2);
}

.info-item:hover::after {
    left: 100%;
}

.info-item:hover .info-label,
.info-item:hover .info-value {
    color: var(--red);
}

.info-label {
    font-size: 0.7em;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.info-value {
    font-size: 0.95em;
    color: #4a3a3a;
    font-weight: 600;
    transition: color 0.3s ease;
}

/* ステータス行 */
.stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.stat-label {
    width: 100px;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 0.9em;
    color: var(--red);
    font-weight: 700;
}

.stat-bar-container {
    flex: 1;
    background: var(--yellow-light);
    height: 22px;
    border-radius: 11px;
    overflow: hidden;
    position: relative;
    border: 2px solid var(--yellow);
}

.stat-bar {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--red), #a01010, var(--red));
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 8px rgba(210, 20, 20, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.stat-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shine 2s ease-in-out infinite;
}

@keyframes shine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.stat-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent);
}

.stat-value {
    width: 65px;
    text-align: right;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9em;
    font-weight: 700;
    color: var(--red);
}

/* 引用ボックス */
.quote-box {
    background: linear-gradient(135deg, var(--yellow-light) 0%, #fff8e0 100%);
    border-radius: 18px;
    padding: 25px;
    position: relative;
    margin: 20px 0;
    border: 3px solid var(--yellow);
    box-shadow: 
        0 5px 15px rgba(240, 200, 40, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.quote-box::before {
    content: '"';
    position: absolute;
    top: -12px;
    left: 20px;
    font-size: 3.5em;
    color: var(--yellow);
    font-family: Georgia, serif;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(240, 200, 40, 0.3);
}

.quote-box::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(240, 200, 40, 0.2) 0%, transparent 70%);
    border-radius: 0 18px 0 18px;
}

.quote {
    font-size: 1em;
    line-height: 2.2;
    color: #4a3a3a;
    position: relative;
    z-index: 1;
    font-style: italic;
}

.quote-jp {
    display: block;
    margin-top: 12px;
    font-size: 0.9em;
    color: var(--red);
    font-weight: 700;
    letter-spacing: 1px;
    padding-left: 15px;
    border-left: 3px solid var(--yellow);
}

/* タグクラウド */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

.tag {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 0.85em;
    background: white;
    color: var(--red);
    padding: 10px 18px;
    border-radius: 20px;
    font-weight: 700;
    border: 2px solid var(--red);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(210, 20, 20, 0.1), transparent);
    transition: left 0.3s ease;
}

.tag:nth-child(even) {
    border-color: var(--yellow);
    color: #8a7010;
}

.tag:nth-child(even)::before {
    background: linear-gradient(90deg, transparent, rgba(240, 200, 40, 0.1), transparent);
}

.tag:hover {
    background: var(--red);
    color: white;
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 18px rgba(210, 20, 20, 0.35);
}

.tag:hover::before {
    left: 100%;
}

.tag:nth-child(even):hover {
    background: var(--yellow);
    color: #4a3a00;
    box-shadow: 0 6px 18px rgba(240, 200, 40, 0.4);
}

/* プロフィールテキスト */
.profile-text {
    line-height: 2.2;
    color: #4a3a3a;
    font-size: 0.95em;
}

.highlight {
    color: var(--red);
    font-weight: 700;
    background: linear-gradient(transparent 65%, var(--yellow) 65%);
    padding: 0 3px;
}

/* 特殊技 */
.special-move {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--red), #a01010, var(--red));
    padding: 20px 25px;
    border-radius: 18px;
    text-align: center;
    margin-top: 25px;
    box-shadow: 
        0 6px 20px rgba(210, 20, 20, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: 3px;
    position: relative;
    overflow: hidden;
    animation: specialGlow 4s ease-in-out infinite;
}

.special-move::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: rotate 3s linear infinite;
}

@keyframes specialGlow {
    0%, 100% { box-shadow: 0 6px 20px rgba(210, 20, 20, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
    50% { box-shadow: 0 8px 25px rgba(210, 20, 20, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* フッター */
.footer {
    text-align: center;
    padding: 45px 20px;
    margin-top: 35px;
    border-top: 3px solid var(--yellow);
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 248, 240, 0.9) 100%);
    border-radius: 20px 20px 0 0;
}

.footer::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--yellow), var(--red), var(--yellow));
    animation: rainbow-flow 4s linear infinite;
}

.footer-logo {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.2em;
    color: var(--red);
    font-weight: 700;
    letter-spacing: 4px;
}

.footer-text {
    font-size: 0.85em;
    color: #8a1010;
    letter-spacing: 2px;
    margin-top: 8px;
}

.footer-quote {
    margin-top: 18px;
    font-style: italic;
    color: var(--red);
    font-size: 0.9em;
    font-weight: 600;
}

/* 視差効果 */
.parallax-element {
    transition: transform 0.1s ease-out;
}

/* フェードインアニメーション */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

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

/* カードの遅延アニメーション */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }
.card:nth-child(7) { animation-delay: 0.7s; }

/* レスポンシブデザイン */
@media (max-width: 600px) {
    .name {
        font-size: 2em;
    }
    .banner {
        height: 140px;
    }
    .card {
        padding: 22px 18px;
    }
    .stat-row {
        flex-wrap: wrap;
    }
    .stat-bar-container {
        width: 100%;
        margin-top: 8px;
    }
    .stat-value {
        width: auto;
        margin-left: 10px;
    }
    .particles {
        display: none;
    }
    .corner-accents {
        display: none;
    }
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 30px 15px;
    }
    .avatar-container {
        width: 150px;
        height: 150px;
    }
    .name {
        font-size: 1.8em;
    }
    .badge-row {
        flex-direction: column;
        gap: 8px;
    }
    .info-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 10px;
    }
    .tag-cloud {
        gap: 8px;
    }
    .tag {
        font-size: 0.8em;
        padding: 8px 14px;
    }
}

/* 高解像度画面の最適化 */
@media (min-width: 1200px) {
    .container {
        max-width: 1000px;
    }
    .name {
        font-size: 3.2em;
    }
    .banner {
        height: 200px;
    }
    .avatar-container {
        width: 220px;
        height: 220px;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    body {
        background: 
            linear-gradient(180deg, #2a1f1f 0%, #1f1515 50%, #251a1a 100%),
            radial-gradient(circle at 20% 80%, rgba(210, 20, 20, 0.05) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(240, 200, 40, 0.05) 0%, transparent 50%);
        color: #e0d0d0;
    }
    
    .card {
        background: rgba(40, 30, 30, 0.95);
        color: #e0d0d0;
    }
    
    .info-item {
        background: linear-gradient(135deg, #3a2f2f 0%, #2f2525 100%);
        color: #e0d0d0;
    }
    
    .quote-box {
        background: linear-gradient(135deg, rgba(240, 200, 40, 0.1) 0%, rgba(255, 248, 224, 0.1) 100%);
        color: #e0d0d0;
    }
}
