/* 全体のスタイル設定 */
body {
    margin: 0;
    padding: 0;
    background-image: url('https://i.imgur.com/JHxoLox.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #d9b36c;
    font-family: 'Special Elite', serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 11, 5, 0.7);
    z-index: 0;
}

/* ロード画面のスタイル */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #120b05;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#typewriter {
    font-size: 36px;
    color: #d9b36c;
    letter-spacing: 5px;
    border-right: 3px solid #d9b36c;
    padding-right: 5px;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { border-color: transparent; }
    50% { border-color: #d9b36c; }
}

/* プロフィールカード本体 */
.profile-card {
    background: linear-gradient(145deg, #2a1a10, #1b1009);
    border: 4px solid #8b6b43;
    border-radius: 15px;
    padding: 40px 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.9), inset 0 0 20px rgba(0,0,0,0.6);
    z-index: 1;
    position: relative;
}

/* 右上の丸いコピーボタン */
.copy-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px; /* アイコンが入りやすいように少しだけ大きくしました */
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle, #d4af37, #8b6b43);
    border: 2px solid #3d2616;
    color: #1a1006;
    cursor: pointer;
    box-shadow: 2px 4px 8px rgba(0,0,0,0.7), inset 0px 2px 4px rgba(255,255,255,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.1s;
    z-index: 10;
}

.copy-btn:active {
    transform: scale(0.92);
    box-shadow: 0 2px 3px rgba(0,0,0,0.7);
}

/* ボタン内のアイコン画像設定 */
.copy-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    pointer-events: none; /* 画像自体がクリックの邪魔をしないようにする */
}

/* コピー完了の吹き出し */
.tooltip {
    position: absolute;
    top: -35px;
    right: -10px;
    background: #1a1006;
    color: #d9b36c;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid #5c4021;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
    pointer-events: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.8);
}

.tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* プロフィール画像 */
.profile-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
    object-fit: cover;
    margin-bottom: 15px;
}

.name {
    font-size: 24px;
    margin: 0 0 10px;
    text-shadow: 2px 2px 4px #000;
    letter-spacing: 2px;
}

.bio {
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.6;
    color: #a68c68;
}

/* Spotifyプレーヤーの装飾枠 */
.spotify-wrapper {
    position: relative;
    background: linear-gradient(145deg, #3d2616, #1b1009);
    border: 2px solid #5c4021;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 30px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8), 3px 6px 12px rgba(0,0,0,0.7);
}

.spotify-wrapper iframe {
    display: block;
}

/* リンクボタン */
.links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.link-btn {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(to bottom, #d4af37, #8b6b43, #5c4021);
    color: #1a1006;
    text-decoration: none;
    padding: 16px;
    font-size: 18px;
    font-family: inherit;
    font-weight: bold;
    text-align: center;
    border: 2px solid #3d2616;
    border-radius: 5px;
    box-shadow: 3px 6px 12px rgba(0,0,0,0.7), inset 0px 2px 5px rgba(255,255,255,0.4);
    transition: all 0.2s ease;
}

.link-btn:hover, .link-btn:active {
    transform: translateY(3px);
    box-shadow: 1px 2px 5px rgba(0,0,0,0.7), inset 0px 1px 3px rgba(255,255,255,0.4);
    filter: brightness(1.1);
}

/* リベット（鋲）の共通スタイル */
.rivet {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #d9b36c, #5c4021);
    border-radius: 50%;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.8), inset -1px -1px 2px rgba(0,0,0,0.5);
    z-index: 2;
}

.top-left { top: 6px; left: 6px; }
.top-right { top: 6px; right: 6px; }
.bottom-left { bottom: 6px; left: 6px; }
.bottom-right { bottom: 6px; right: 6px; }