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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a2e 100%);
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #8892b0;
}

main {
    display: grid;
    gap: 2rem;
}

section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.input-group {
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cbd5e0;
    font-weight: 500;
}

input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

select {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

select option {
    background: #1a1a2e;
    color: #ffffff;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #764ba2;
}

input[type="color"] {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    cursor: pointer;
}

.play-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.play-btn:active {
    transform: translateY(0);
}

.preview-container {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a2e;
    border-radius: 12px;
    padding: 3rem;
    overflow: hidden;
    position: relative;
}

.animated-text {
    font-size: 48px;
    color: #ffffff;
    position: relative;
    display: inline-block;
}

.code-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px 8px 0 0;
    color: #cbd5e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    color: #ffffff;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.code-container {
    position: relative;
    background: #0a0e27;
    border-radius: 0 8px 8px 8px;
    overflow: hidden;
}

pre {
    padding: 2rem;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e2e8f0;
}

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.3);
    border: 1px solid #667eea;
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: rgba(102, 126, 234, 0.5);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

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

.example-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    transform: translateY(-2px);
}

footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 0;
    color: #8892b0;
}

footer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #764ba2;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .controls {
        grid-template-columns: 1fr;
    }
    
    .preview-container {
        padding: 2rem 1rem;
    }
    
    .animated-text {
        font-size: 32px;
    }
    
    pre {
        padding: 1rem;
        font-size: 0.8rem;
    }
}

/* アニメーションクラス */
.fadeIn {
    opacity: 0;
}

.slideIn {
    opacity: 0;
    transform: translateX(-100%);
}

.bounce {
    transform-origin: center bottom;
}

.rotate {
    opacity: 0;
    transform: scale(0);
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    width: 0;
}

.glitch {
    position: relative;
}

.wave {
    display: inline-block;
}

.neon {
    animation: neon 2s ease-in-out infinite;
}

.rotate3d {
    transform-style: preserve-3d;
}

.elastic {
    transform: scale(0);
}