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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans JP', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #ffeaa7 0%, #dfe6e9 100%);
    min-height: 100vh;
    color: #2d3436;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 40px 0;
}

header h1 {
    font-size: 3.5em;
    background: linear-gradient(135deg, #e17055, #fdcb6e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    font-weight: bold;
}

.subtitle {
    font-size: 1.2em;
    color: #636e72;
}

main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.search-section {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

#kanjiInput {
    width: 200px;
    padding: 15px;
    font-size: 24px;
    text-align: center;
    border: 2px solid #dfe6e9;
    border-radius: 10px;
    transition: border-color 0.3s;
}

#kanjiInput:focus {
    outline: none;
    border-color: #e17055;
}

.primary-btn {
    background: linear-gradient(135deg, #e17055, #fdcb6e);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(225, 112, 85, 0.4);
}

.quick-select {
    margin-bottom: 30px;
    text-align: center;
}

.quick-select h3 {
    color: #e17055;
    margin-bottom: 15px;
}

.kanji-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.kanji-btn {
    width: 60px;
    height: 60px;
    font-size: 28px;
    background: #f5f3f0;
    border: 2px solid #dfe6e9;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.kanji-btn:hover {
    background: #e17055;
    color: white;
    transform: scale(1.1);
}

.canvas-container {
    background: #f5f3f0;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

#strokeCanvas {
    width: 100%;
    height: 300px;
    background: white;
    border-radius: 10px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.control-btn {
    background: #74b9ff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.control-btn:hover {
    background: #0984e3;
}

#speedSlider {
    width: 150px;
}

#speedLabel {
    font-size: 14px;
    color: #636e72;
}

.stroke-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.stroke-info h3 {
    color: #e17055;
    margin-bottom: 15px;
}

.stroke-info p {
    margin: 10px 0;
    font-size: 16px;
}

.stroke-info span {
    font-weight: bold;
    color: #2d3436;
}

.learning-tips {
    background: linear-gradient(135deg, #fab1a0 0%, #ffeaa7 100%);
    padding: 30px;
    border-radius: 15px;
}

.learning-tips h3 {
    color: #d63031;
    margin-bottom: 20px;
}

.learning-tips ul {
    list-style: none;
}

.learning-tips li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
}

.learning-tips li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #d63031;
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 40px 0;
    color: #636e72;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2.5em;
    }
    
    main {
        padding: 20px;
    }
    
    .search-section {
        flex-direction: column;
        align-items: center;
    }
    
    #kanjiInput {
        width: 100%;
        max-width: 200px;
    }
    
    .kanji-buttons {
        justify-content: center;
    }
    
    .controls {
        flex-wrap: wrap;
    }
}