* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Sans', 'Meiryo', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #fff;
    position: relative;
    padding-top: 70px;
}

/* ヘッダー */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600;
    transition: opacity 0.3s;
}

.header-link:hover {
    opacity: 0.8;
}

.header-logo {
    height: 32px;
    width: auto;
}

#visualizerCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
}

#gameContainer {
    text-align: center;
    position: relative;
    z-index: 1;
    min-width: 800px;
}

#gameCanvas {
    border: 3px solid #d4af37;
    background: linear-gradient(180deg, #0f3460 0%, #1a1a2e 100%);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    cursor: none;
    display: block;
    margin: 20px auto;
}

h1 {
    color: #d4af37;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#info {
    margin: 20px 0;
    font-size: 1.1em;
}

#score {
    font-size: 1.3em;
    color: #ffd700;
    margin: 10px 0;
}

#controls {
    color: #aaa;
    margin-top: 15px;
    font-size: 0.9em;
}

#gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 15px;
    border: 3px solid #d4af37;
    display: none;
    z-index: 10;
}

#gameOver h2 {
    color: #ff6b6b;
    font-size: 2em;
    margin-bottom: 20px;
}

#gameOver p {
    font-size: 1.5em;
    margin: 15px 0;
    color: #ffd700;
}

button {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    border: none;
    color: #1a1a2e;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.5);
}

#titleScreen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 50px 60px;
    border-radius: 20px;
    border: 4px solid #d4af37;
    z-index: 10;
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.5);
}

#titleScreen h2 {
    color: #ffd700;
    font-size: 2em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 6px rgba(255, 215, 0, 0.5);
}

#titleScreen p {
    font-size: 1.2em;
    margin: 15px 0 30px 0;
    color: #fff;
}

#titleScreen .story {
    background: rgba(212, 175, 55, 0.1);
    padding: 20px 30px;
    border-radius: 12px;
    margin: 25px 0 30px 0;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

#titleScreen .story p {
    font-size: 1.1em;
    margin: 10px 0;
    color: #ffe66d;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#titleScreen .instructions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #444;
    color: #aaa;
    font-size: 1em;
}

#titleScreen .instructions p {
    margin: 8px 0;
    font-size: 0.95em;
    color: #ccc;
}

.game-button {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    border: none;
    color: #1a1a2e;
    padding: 18px 50px;
    font-size: 1.4em;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.game-button:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

