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

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(to bottom, #0a0a2a 0%, #1a1a3a 50%, #2a2a4a 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 200, 100, 0.5);
    letter-spacing: 0.1em;
}

.subtitle {
    font-size: 1.2rem;
    color: #ffcc66;
    opacity: 0.8;
}

.lang-switcher {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.lang-btn {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.lang-btn.active {
    background: rgba(255, 200, 100, 0.3);
    border-color: #ffcc66;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.canvas-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 40, 0.8) 0%, rgba(0, 0, 20, 0.9) 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#sparklerCanvas {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.instructions.hidden {
    opacity: 0;
}

.controls {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-size: 0.9rem;
    opacity: 0.9;
}

select, input[type="range"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    outline: none;
}

select option {
    background: #2a2a4a;
}

input[type="range"] {
    width: 100px;
}

.toggle-btn {
    padding: 5px 15px;
    background: rgba(100, 255, 100, 0.3);
    border: 1px solid rgba(100, 255, 100, 0.5);
    color: #fff;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn:not(.active) {
    background: rgba(255, 100, 100, 0.3);
    border-color: rgba(255, 100, 100, 0.5);
}

.stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 30px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.stat-item span:first-child {
    display: block;
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 5px;
}

.stat-item span:nth-child(2) {
    font-size: 2rem;
    font-weight: bold;
    color: #ffcc66;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    opacity: 0.6;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .canvas-container {
        height: 400px;
    }
    
    .controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats {
        gap: 20px;
    }
}

/* 火花のグロー効果 */
@keyframes sparkGlow {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.spark-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 200, 100, 0.3) 0%, transparent 70%);
    pointer-events: none;
    animation: sparkGlow 0.5s ease-out;
}