* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.input-area {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#input-field {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
}

.stroke-count {
    font-size: 14px;
    color: #666;
}

.action-btn {
    padding: 15px 25px;
    font-size: 20px;
    border: none;
    border-radius: 8px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background-color: #45a049;
}

.stroke-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stroke-btn {
    padding: 20px;
    font-size: 32px;
    border: none;
    border-radius: 8px;
    background-color: #1890ff;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.stroke-btn:hover {
    background-color: #096dd9;
}

#backspace-btn {
    background-color: #ff4d4f;
}

#backspace-btn:hover {
    background-color: #f5222d;
}

h3 {
    margin: 15px 0 10px;
    color: #333;
    font-size: 16px;
}

.recent-chars {
    margin: 20px 0;
}

.recent-chars-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.recent-char {
    padding: 8px 12px;
    font-size: 20px;
    background-color: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.recent-char:hover {
    background-color: #e0e0e0;
}

.candidates-area {
    margin-top: 20px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
}

.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
}

.candidate-char {
    position: relative;
    padding: 10px;
    font-size: 24px;
    text-align: center;
    background-color: #f5f5f5;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    border: 1px solid #ddd;
}

.candidate-char:hover {
    background-color: #e6e6e6;
    border-color: #1890ff;
}

.candidate-char .stroke-number {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
    color: #666;
}

@media (max-width: 600px) {
    .stroke-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .input-area {
        flex-direction: column;
    }
    
    .input-group {
        width: 100%;
    }
    
    .candidates-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }
    
    .candidate-char {
        font-size: 20px;
    }
} 