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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #ffeef8 0%, #e6f7ff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    touch-action: pan-y;
}

.container {
    width: 90%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.controls {
    margin-bottom: 2rem;
}

.generate-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    margin-bottom: 1.5rem;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

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

.slider-group {
    margin-bottom: 1.5rem;
}

.slider-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.slider-group input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#artCanvas {
    width: 100%;
    height: auto;
    max-width: 500px;
    margin: 0 auto 2rem;
    display: block;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    background: white;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#artCanvas:hover {
    transform: scale(1.02);
}

.save-controls {
    display: flex;
    gap: 1rem;
}

.save-btn,
.share-btn {
    flex: 1;
    padding: 0.8rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn {
    background: #4ecdc4;
    color: white;
}

.save-btn:hover {
    background: #45b7b1;
    transform: translateY(-2px);
}

.share-btn {
    background: #ff6b6b;
    color: white;
}

.share-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* モバイル対応 */
@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .generate-btn {
        font-size: 1.1rem;
        padding: 0.8rem;
    }
    
    .save-controls {
        flex-direction: column;
    }
    
    .save-btn,
    .share-btn {
        width: 100%;
    }
}

/* アニメーション */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

/* タッチデバイスでのハイライト無効化 */
* {
    -webkit-tap-highlight-color: transparent;
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #ff5252, #45b7b1);
}