body {
    margin: 0;
    padding: 20px;
    padding-top: 80px;
    font-family: 'Segoe UI', Mequlareo, sans-serif;
    background: linear-gradient(to bottom, #000428 0%, #004e92 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* ヘッダースタイル */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.header-link:hover {
    color: #60a5fa;
}

.header-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 15% 55%, white, transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: twinkle 200s linear infinite;
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
}

@keyframes twinkle {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 200%; }
}

.container {
    background: rgba(10, 10, 30, 0.85);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 100px rgba(100, 150, 255, 0.2);
    max-width: 900px;
    width: 100%;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
    text-align: center;
    color: #ffffff;
    margin: 0 0 20px 0;
    font-size: 2em;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 40px rgba(100, 150, 255, 0.3);
}

.description {
    text-align: center;
    color: #b8c5db;
    margin-bottom: 20px;
    line-height: 1.6;
}

.canvas-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    background: #000000;
    border-radius: 10px;
    padding: 20px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(100, 150, 255, 0.2);
}

canvas {
    border: 2px solid #1a1a3e;
    cursor: crosshair;
    background: #000000;
    box-shadow: 0 0 30px rgba(100, 150, 255, 0.3);
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

button {
    padding: 12px 24px;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #1a2980 0%, #26d0ce 100%);
    color: white;
    font-weight: bold;
    transition: transform 0.1s, box-shadow 0.1s;
    box-shadow: 0 4px 15px rgba(38, 208, 206, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(38, 208, 206, 0.5), 0 0 30px rgba(38, 208, 206, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #333;
    cursor: not-allowed;
    transform: none;
    opacity: 0.5;
    box-shadow: none;
}

.settings {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
    padding: 20px;
    background: rgba(20, 20, 50, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.setting-group label {
    font-weight: bold;
    color: #b8c5db;
    font-size: 14px;
}

input[type="range"] {
    width: 150px;
}

.speed-value {
    text-align: center;
    color: #8899bb;
    font-size: 14px;
}

.stats {
    text-align: center;
    color: #b8c5db;
    margin: 10px 0;
    font-size: 14px;
}

.patterns {
    margin: 20px 0;
    padding: 20px;
    background: rgba(20, 20, 50, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.patterns h3 {
    margin: 0 0 15px 0;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.pattern-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.pattern-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
